[PATCH 1/3] uvcvideo: initialise the entity function field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since a recent commit:

[media] media-device: move media entity register/unregister functions

drivers have to set entity function before registering an entity. Fix
the uvcvideo driver to comply with this.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
---
 drivers/media/usb/uvc/uvc_entity.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c
index ac386bb..d93f413 100644
--- a/drivers/media/usb/uvc/uvc_entity.c
+++ b/drivers/media/usb/uvc/uvc_entity.c
@@ -88,6 +88,11 @@ static int uvc_mc_init_entity(struct uvc_video_chain *chain,
 		if (ret < 0)
 			return ret;
 
+		if (UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA)
+			entity->subdev.entity.function = MEDIA_ENT_F_CAM_SENSOR;
+		else
+			entity->subdev.entity.function = MEDIA_ENT_F_IO_V4L;
+
 		ret = v4l2_device_register_subdev(&chain->dev->vdev,
 						  &entity->subdev);
 	} else if (entity->vdev != NULL) {
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux