public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented
@ 2016-02-16 18:51 Javier Martinez Canillas
  2016-02-16 19:53 ` Benoit Parrot
  0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2016-02-16 18:51 UTC (permalink / raw)
  To: linux-kernel
  Cc: Benoit Parrot, Javier Martinez Canillas, Sakari Ailus,
	Mauro Carvalho Chehab, Bryan Wu, Laurent Pinchart, linux-media

After sub-dev registration in v4l2_async_test_notify(), the v4l2-async
core calls the registered_async callback but if a sub-dev driver does
not implement it, v4l2_subdev_call() will return a -ENOIOCTLCMD which
should not be considered an error.

Reported-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/media/v4l2-core/v4l2-async.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index 716bfd47daab..4d809115ba49 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -113,7 +113,7 @@ static int v4l2_async_test_notify(struct v4l2_async_notifier *notifier,
 	list_move(&sd->async_list, &notifier->done);
 
 	ret = v4l2_device_register_subdev(notifier->v4l2_dev, sd);
-	if (ret < 0) {
+	if (ret < 0 && ret != -ENOIOCTLCMD) {
 		if (notifier->unbind)
 			notifier->unbind(notifier, sd, asd);
 		return ret;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-16 20:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16 18:51 [PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented Javier Martinez Canillas
2016-02-16 19:53 ` Benoit Parrot
2016-02-16 20:00   ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox