[media] uvcvideo: register entity subdev on init
authorJavier Martinez Canillas <javier@osg.samsung.com>
Fri, 11 Dec 2015 17:16:35 +0000 (15:16 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:09 +0000 (12:19 -0200)
commit1cb2f6f4b1652ad4e19894a4b4b82b0c2ea8a4b6
tree5e95f866d28a165c2843ec8345644fa074fa9c56
parent552faf4c083d8e86c6d86160ae3da0412280f690
[media] uvcvideo: register entity subdev on init

The uvc_mc_register_entities() function iterated over the entities three
times to initialize the entities, register the subdev for the ones whose
type was UVC_TT_STREAMING and to create the entities links.

But this can be simplied by merging the init and registration logic in a
single loop.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/uvc/uvc_entity.c