Commit 2c0108e1c02f9fc95f465adc4d2ce1ad8688290a
Committed by
Mauro Carvalho Chehab
1 parent
8d4d9329cd
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
[media] omap3isp: Correctly set QUERYCAP capabilities
device_caps in struct v4l2_capability were inadequately set in VIDIOC_QUERYCAP. Fix this. Without this a WARN_ON in the v4l2 core is triggered. This WARN_ON was added for kernel 3.19 exactly to detect these situations. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
drivers/media/platform/omap3isp/ispvideo.c
... | ... | @@ -602,10 +602,13 @@ |
602 | 602 | strlcpy(cap->card, video->video.name, sizeof(cap->card)); |
603 | 603 | strlcpy(cap->bus_info, "media", sizeof(cap->bus_info)); |
604 | 604 | |
605 | + cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | |
606 | + | V4L2_CAP_STREAMING | V4L2_CAP_DEVICE_CAPS; | |
607 | + | |
605 | 608 | if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) |
606 | - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; | |
609 | + cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; | |
607 | 610 | else |
608 | - cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; | |
611 | + cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; | |
609 | 612 | |
610 | 613 | return 0; |
611 | 614 | } |