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


Groups > linux.kernel > #1335769 > unrolled thread

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

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2016-02-16 21:10 +0100
Last post2016-02-17 10:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] [media] v4l2-async: Don't fail if registered_async isn't implemented Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-16 21:10 +0100
    Re: [PATCH v2] [media] v4l2-async: Don't fail if registered_async  isn't implemented Benoit Parrot <bparrot@ti.com> - 2016-02-16 21:20 +0100
    Re: [PATCH v2] [media] v4l2-async: Don't fail if registered_async  isn't implemented Sakari Ailus <sakari.ailus@iki.fi> - 2016-02-17 10:40 +0100

#1335769 — [PATCH v2] [media] v4l2-async: Don't fail if registered_async isn't implemented

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-02-16 21:10 +0100
Subject[PATCH v2] [media] v4l2-async: Don't fail if registered_async isn't implemented
Message-ID<r2U6C-4e2-13@gated-at.bofh.it>
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>

---

Changes in v2:
- Check the return of v4l2_subdev_call (Benoit).

 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..a4b224d92572 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -120,7 +120,7 @@ static int v4l2_async_test_notify(struct v4l2_async_notifier *notifier,
 	}
 
 	ret = v4l2_subdev_call(sd, core, registered_async);
-	if (ret < 0) {
+	if (ret < 0 && ret != -ENOIOCTLCMD) {
 		if (notifier->unbind)
 			notifier->unbind(notifier, sd, asd);
 		return ret;
-- 
2.5.0

[toc] | [next] | [standalone]


#1335789 — Re: [PATCH v2] [media] v4l2-async: Don't fail if registered_async isn't implemented

FromBenoit Parrot <bparrot@ti.com>
Date2016-02-16 21:20 +0100
SubjectRe: [PATCH v2] [media] v4l2-async: Don't fail if registered_async isn't implemented
Message-ID<r2Ugj-4i7-25@gated-at.bofh.it>
In reply to#1335769
Tested-by: Benoit Parrot <bparrot@ti.com>

Javier Martinez Canillas <javier@osg.samsung.com> wrote on Tue [2016-Feb-16 17:03:21 -0300]:
> 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>
> 
> ---
> 
> Changes in v2:
> - Check the return of v4l2_subdev_call (Benoit).
> 
>  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..a4b224d92572 100644
> --- a/drivers/media/v4l2-core/v4l2-async.c
> +++ b/drivers/media/v4l2-core/v4l2-async.c
> @@ -120,7 +120,7 @@ static int v4l2_async_test_notify(struct v4l2_async_notifier *notifier,
>  	}
>  
>  	ret = v4l2_subdev_call(sd, core, registered_async);
> -	if (ret < 0) {
> +	if (ret < 0 && ret != -ENOIOCTLCMD) {
>  		if (notifier->unbind)
>  			notifier->unbind(notifier, sd, asd);
>  		return ret;
> -- 
> 2.5.0
> 

[toc] | [prev] | [next] | [standalone]


#1336169 — Re: [PATCH v2] [media] v4l2-async: Don't fail if registered_async isn't implemented

FromSakari Ailus <sakari.ailus@iki.fi>
Date2016-02-17 10:40 +0100
SubjectRe: [PATCH v2] [media] v4l2-async: Don't fail if registered_async isn't implemented
Message-ID<r36Ku-4qr-29@gated-at.bofh.it>
In reply to#1335769
On Tue, Feb 16, 2016 at 05:03:21PM -0300, Javier Martinez Canillas wrote:
> 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>

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web