Call the "post_register()" subdev operation on a just registered subdevice, immediately after having called the 'bound' notifier operation on the parent. Signed-off-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx> --- drivers/media/v4l2-core/v4l2-async.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 0836e01e59ca..8656b50ee799 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -293,6 +293,16 @@ static int v4l2_async_match_notify(struct v4l2_async_notifier *notifier, return ret; } + if (!(notifier->flags & V4L2_ASYNC_NOTIFIER_SKIP_POST_REGISTER) && + sd->ops->core && sd->ops->core->post_register) { + ret = sd->ops->core->post_register(sd); + if (ret) { + v4l2_async_notifier_call_unbind(notifier, sd, sd->asd); + v4l2_device_unregister_subdev(sd); + return ret; + } + } + /* Remove from the waiting list */ list_del(&asd->list); sd->asd = asd; -- 2.31.1