All media entities need a proper function. Otherwise a warning is shown in dmesg: uvcvideo 1-1:1.0: Entity type for entity GPIO was not initialized!
Please note that changes in virtual entities will not be considered a uAPI change.
Cc: stable@vger.kernel.org Fixes: 2886477ff987 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT") Signed-off-by: Ricardo Ribalda ribalda@chromium.org --- drivers/media/usb/uvc/uvc_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c index 3823ac9c8045b3ad8530372fd38983aaafbd775d..ee1007add243036f68b7014ca621813e461fa73d 100644 --- a/drivers/media/usb/uvc/uvc_entity.c +++ b/drivers/media/usb/uvc/uvc_entity.c @@ -85,6 +85,7 @@ static int uvc_mc_init_entity(struct uvc_video_chain *chain, break; case UVC_VC_PROCESSING_UNIT: case UVC_VC_EXTENSION_UNIT: + case UVC_EXT_GPIO_UNIT: /* For lack of a better option. */ function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER; break; @@ -105,7 +106,6 @@ static int uvc_mc_init_entity(struct uvc_video_chain *chain, case UVC_OTT_DISPLAY: case UVC_OTT_MEDIA_TRANSPORT_OUTPUT: case UVC_EXTERNAL_VENDOR_SPECIFIC: - case UVC_EXT_GPIO_UNIT: default: function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN; break;