Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335726 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2016-02-16 20:00 +0100 |
| Last post | 2016-02-16 21:10 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-16 20:00 +0100
Re: [PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented Benoit Parrot <bparrot@ti.com> - 2016-02-16 21:00 +0100
Re: [PATCH] [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
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-02-16 20:00 +0100 |
| Subject | [PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented |
| Message-ID | <r2T0R-3ha-1@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>
---
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, ¬ifier->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
[toc] | [next] | [standalone]
| From | Benoit Parrot <bparrot@ti.com> |
|---|---|
| Date | 2016-02-16 21:00 +0100 |
| Subject | Re: [PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented |
| Message-ID | <r2TWY-3TM-25@gated-at.bofh.it> |
| In reply to | #1335726 |
Javier Martinez Canillas <javier@osg.samsung.com> wrote on Tue [2016-Feb-16 15:51:05 -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>
>
> ---
>
> 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, ¬ifier->done);
>
> ret = v4l2_device_register_subdev(notifier->v4l2_dev, sd);
> - if (ret < 0) {
> + if (ret < 0 && ret != -ENOIOCTLCMD) {
NAK.
This fix should be on the next if block.
The one that actually invokes the registered_async call back.
As is it does not help.
Benoit
> if (notifier->unbind)
> notifier->unbind(notifier, sd, asd);
> return ret;
> --
> 2.5.0
>
[toc] | [prev] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-02-16 21:10 +0100 |
| Subject | Re: [PATCH] [media] v4l2-async: Don't fail if registered_async isn't implemented |
| Message-ID | <r2U6C-4e2-5@gated-at.bofh.it> |
| In reply to | #1335765 |
Hello Benoit,
On 02/16/2016 04:53 PM, Benoit Parrot wrote:
> Javier Martinez Canillas <javier@osg.samsung.com> wrote on Tue [2016-Feb-16 15:51:05 -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>
>>
>> ---
>>
>> 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, ¬ifier->done);
>>
>> ret = v4l2_device_register_subdev(notifier->v4l2_dev, sd);
>> - if (ret < 0) {
>> + if (ret < 0 && ret != -ENOIOCTLCMD) {
>
> NAK.
> This fix should be on the next if block.
> The one that actually invokes the registered_async call back.
Yeah, that's actually what the commit says but I'm too stupid
to write a one line patch... I'll send a v2.
> As is it does not help.
>
Sorry about that, I shouldn't post patches in a rush.
> Benoit
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web