]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: uvcvideo: Fix menu count handling for userspace XU mappings
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 6 Jun 2023 16:55:30 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 15:32:53 +0000 (17:32 +0200)
commitceecb1bcaf7a21367875a222d267448ef3bc60bd
tree5cf7ce48ac14a3d19d131d4ac2d7af9624e43b00
parent531c6ed342d9cbfbf55ef1f293fbf11db8d10835
media: uvcvideo: Fix menu count handling for userspace XU mappings

commit 6d00f4ec1205a01a6aac1fe3ce04d53a6b2ede59 upstream.

When commit 716c330433e3 ("media: uvcvideo: Use standard names for
menus") reworked the handling of menu controls, it inadvertently
replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
equivalent to the former, which broke adding XU mappings from userspace.
Fix it.

Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
Cc: stable@vger.kernel.org
Reported-by: Poncho <poncho@spahan.ch>
Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/uvc/uvc_v4l2.c