Skip to content

Commit

Permalink
[media] v4l2-async: call registered_async after subdev registration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Javier Martinez Canillas authored and Mauro Carvalho Chehab committed Feb 10, 2016
1 parent 798bd94 commit 7c3e1ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/media/v4l2-core/v4l2-async.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7c3e1ec

Please sign in to comment.