Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328028

[PATCH 2/8] [media] v4l2-async: call registered_async after subdev registration

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH 2/8] [media] v4l2-async: call registered_async after subdev registration
Date 2016-02-05 20:20 +0100
Message-ID <qYU5c-4l7-27@gated-at.bofh.it> (permalink)
References <qYU5b-4l7-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---

 drivers/media/v4l2-core/v4l2-async.c | 7 +++++++
 1 file changed, 7 insertions(+)

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);
 
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] [media] tvp5150: add HW input connectors support Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-05 20:20 +0100
  [PATCH 2/8] [media] v4l2-async: call registered_async after subdev registration Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-05 20:20 +0100
  [PATCH 4/8] [media] tvp5150: store dev id and rom version Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-05 20:20 +0100
  [PATCH 5/8] [media] tvp5150: add internal signal generator to HW input list Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-05 20:20 +0100
  [PATCH 7/8] [media] tvp5150: document input connectors DT bindings Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-05 20:20 +0100
    Re: [PATCH 7/8] [media] tvp5150: document input connectors DT  bindings Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-08 19:30 +0100

csiph-web