summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc/uvcvideo.h
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2020-12-23 14:35:18 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-27 15:01:41 +0100
commitcae79e50d1222010fde8c522410c315f74d35c40 (patch)
tree235389c0a7ba4a2aaba9d23cb4392741ca596b3c /drivers/media/usb/uvc/uvcvideo.h
parent351509c604dcb065305a165d7552058c2cbc447d (diff)
downloadlinux-cae79e50d1222010fde8c522410c315f74d35c40.tar.bz2
media: uvcvideo: Allow extra entities
Increase the size of the id, to avoid collisions with entities implemented by the driver that are not part of the UVC device. Entities exposed by the UVC device use IDs 0-255, extra entities implemented by the driver (such as the GPIO entity) use IDs 256 and up. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb/uvc/uvcvideo.h')
-rw-r--r--drivers/media/usb/uvc/uvcvideo.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 459b2450accf..2643d9adfd4a 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -301,7 +301,12 @@ struct uvc_entity {
* chain. */
unsigned int flags;
- u8 id;
+ /*
+ * Entities exposed by the UVC device use IDs 0-255, extra entities
+ * implemented by the driver (such as the GPIO entity) use IDs 256 and
+ * up.
+ */
+ u16 id;
u16 type;
char name[64];
u8 guid[16];