[media] v4l2-async: Don't fail if registered_async isn't implemented

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>
Tested-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Javier Martinez Canillas 2016-02-16 18:03:21 -02:00 committed by Mauro Carvalho Chehab
parent 3d0ccad0db
commit c574b75913

View File

@ -120,7 +120,7 @@ static int v4l2_async_test_notify(struct v4l2_async_notifier *notifier,
} }
ret = v4l2_subdev_call(sd, core, registered_async); ret = v4l2_subdev_call(sd, core, registered_async);
if (ret < 0) { if (ret < 0 && ret != -ENOIOCTLCMD) {
if (notifier->unbind) if (notifier->unbind)
notifier->unbind(notifier, sd, asd); notifier->unbind(notifier, sd, asd);
return ret; return ret;