]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: Fix device_caps reporting of the registered video-devs
authorHans de Goede <hdegoede@redhat.com>
Sat, 27 Aug 2022 13:54:27 +0000 (15:54 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 07:47:11 +0000 (09:47 +0200)
commitc3ac4c0197c78626a790842fd0a3cbfd893b9d37
treece2781ebd43b06d6d080bdd1878a6a265ca66550
parent29520907099f8e4a2210060073d4e7feb715be36
media: atomisp: Fix device_caps reporting of the registered video-devs

atomisp_subdev_register_entities() had V4L2_CAP_VIDEO_CAPTURE /
V4L2_CAP_VIDEO_OUT swapped. Or-ing in V4L2_CAP_VIDEO_OUT for
the nodes which allow capturing from the camera and or-ing in
V4L2_CAP_VIDEO_CAPTURE for the file-injection node
(mem2mem use of the ISP).

Things happen to still work for the capture device-nodes because
the "shared" caps also included V4L2_CAP_VIDEO_CAPTURE, so those
shared nodes advertised V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUT.

Fix things so that only the correct caps are advertised.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_subdev.c