aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-async.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-02-05 17:09:52 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-10 09:37:36 -0200
commit7c3e1ec1f772c1f740fce3180bf419018582977f (patch)
treeac7e1f7486274cd9e1aec7a820367bc2f0ea3964 /drivers/media/v4l2-core/v4l2-async.c
parent[media] v4l2-subdev: add registered_async subdev core operation (diff)
downloadlinux-dev-7c3e1ec1f772c1f740fce3180bf419018582977f.tar.xz
linux-dev-7c3e1ec1f772c1f740fce3180bf419018582977f.zip
[media] v4l2-async: call registered_async after subdev registration
V4L2 sub-devices might need to do initialization that depends on being registered with a V4L2 device. As an example, sub-devices with Media Controller support may need to register entities and create pad links. Execute the registered_async callback after the sub-device has been registered with the V4L2 device so the driver can do any needed init. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-async.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-async.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index 5bada202b2d3..716bfd47daab 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -119,6 +119,13 @@ static int v4l2_async_test_notify(struct v4l2_async_notifier *notifier,
return ret;
}
+ ret = v4l2_subdev_call(sd, core, registered_async);
+ if (ret < 0) {
+ if (notifier->unbind)
+ notifier->unbind(notifier, sd, asd);
+ return ret;
+ }
+
if (list_empty(&notifier->waiting) && notifier->complete)
return notifier->complete(notifier);