media: uvcvideo: uvc_v4l2_unlocked_ioctl: Invert PM logic
authorRicardo Ribalda <ribalda@chromium.org>
Tue, 1 Jul 2025 06:45:19 +0000 (06:45 +0000)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 11 Jul 2025 17:27:28 +0000 (19:27 +0200)
commit2acded8aa2c89b858495488f6a14cd1d04fc5784
treec62da126b607f5f538f904f92c20aecb329d1e19
parent1657624a69fcfd3f27ba6223e1c8fb6a16815568
media: uvcvideo: uvc_v4l2_unlocked_ioctl: Invert PM logic

Instead of listing the IOCTLs that do not need to turn on the camera,
list the IOCTLs that need to turn it on. This makes the code more
maintainable.

This patch changes the behaviour for unsupported IOCTLs. Those IOCTLs
will not turn on the camera.

Suggested-by: Hans Verkuil <hans@jjverkuil.nl>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Reviewed-by: Hans Verkuil <hans@hverkuil.nl>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20250701-uvc-grannular-invert-v4-7-8003b9b89f68@chromium.org
Signed-off-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/usb/uvc/uvc_v4l2.c