]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[media] v4l2-device: Register entity before calling subdev's registered ops
authorSakari Ailus <sakari.ailus@iki.fi>
Sun, 27 Dec 2015 23:45:00 +0000 (01:45 +0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:16 +0000 (12:19 -0200)
commitbdf5c198261cdda8dcc5375315afe9d8bf4d77d1
treea2d03d22a55622de972b1d75b449babd408dd00c
parent9f80679511b0544d1ed8c9bc2d80030183e9f1ed
[media] v4l2-device: Register entity before calling subdev's registered ops

Registering a V4L2 sub-device includes, among other things, registering
the related media entity and calling the sub-device's registered op. Since
patch "media: convert links from array to list", creating a link between
two pads requires registering the entity first. If the registered() op
involves link creation, the link list head will not be initialised before
it is used.

Resolve this by first registering the entity, then calling its
registered() op.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-device.c