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)
commita2ace25c3f0e8904abc2aadee554cc20c6c3bf6b
treece2781ebd43b06d6d080bdd1878a6a265ca66550
parent6e6c4ae0f0ba295dbf6cbd48d93bec169d6ce431
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