* [PATCH] viafb: fix viafb_find_i2c_adapt return value
@ 2010-12-20 19:16 Dzianis Kahanovich
2010-12-29 1:26 ` Florian Tobias Schandinat
2011-01-04 11:16 ` Dzianis Kahanovich
0 siblings, 2 replies; 3+ messages in thread
From: Dzianis Kahanovich @ 2010-12-20 19:16 UTC (permalink / raw)
To: linux-fbdev
viafb_find_i2c_adapt return unverifyed value, "is_active" field still uplevel.
Fix it.
Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
---
--- a/drivers/video/via/via_i2c.c 2010-12-18 06:42:37.000000000 +0200
+++ b/drivers/video/via/via_i2c.c 2010-12-20 19:55:17.000000000 +0200
@@ -188,7 +188,7 @@ struct i2c_adapter *viafb_find_i2c_adapt
{
struct via_i2c_stuff *stuff = &via_i2c_par[which];
- return &stuff->adapter;
+ return stuff->is_active ? &stuff->adapter : NULL;
}
EXPORT_SYMBOL_GPL(viafb_find_i2c_adapter);
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] viafb: fix viafb_find_i2c_adapt return value
2010-12-20 19:16 [PATCH] viafb: fix viafb_find_i2c_adapt return value Dzianis Kahanovich
@ 2010-12-29 1:26 ` Florian Tobias Schandinat
2011-01-04 11:16 ` Dzianis Kahanovich
1 sibling, 0 replies; 3+ messages in thread
From: Florian Tobias Schandinat @ 2010-12-29 1:26 UTC (permalink / raw)
To: linux-fbdev
[cc'ed Jon; un-cc'ed Joseph as his email address is no longer valid]
Dzianis Kahanovich schrieb:
> viafb_find_i2c_adapt return unverifyed value, "is_active" field still uplevel.
> Fix it.
This patch looks useful to me but the viafb camera driver uses this function at
the moment. It's not a big issue now as 31 will be always I2C but perhaps it
might be a good idea to patch drivers/media/video/via-camera.c
Jon, do you agree that this patch is useful, at least as long we do not
dynamically change the configuration?
Thanks,
Florian Tobias Schandinat
>
> Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
> ---
> --- a/drivers/video/via/via_i2c.c 2010-12-18 06:42:37.000000000 +0200
> +++ b/drivers/video/via/via_i2c.c 2010-12-20 19:55:17.000000000 +0200
> @@ -188,7 +188,7 @@ struct i2c_adapter *viafb_find_i2c_adapt
> {
> struct via_i2c_stuff *stuff = &via_i2c_par[which];
>
> - return &stuff->adapter;
> + return stuff->is_active ? &stuff->adapter : NULL;
> }
> EXPORT_SYMBOL_GPL(viafb_find_i2c_adapter);
>
> --
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] viafb: fix viafb_find_i2c_adapt return value
2010-12-20 19:16 [PATCH] viafb: fix viafb_find_i2c_adapt return value Dzianis Kahanovich
2010-12-29 1:26 ` Florian Tobias Schandinat
@ 2011-01-04 11:16 ` Dzianis Kahanovich
1 sibling, 0 replies; 3+ messages in thread
From: Dzianis Kahanovich @ 2011-01-04 11:16 UTC (permalink / raw)
To: linux-fbdev
Florian Tobias Schandinat wrote:
> [cc'ed Jon; un-cc'ed Joseph as his email address is no longer valid]
>
> Dzianis Kahanovich schrieb:
>> viafb_find_i2c_adapt return unverifyed value, "is_active" field still uplevel.
>> Fix it.
>
> This patch looks useful to me but the viafb camera driver uses this function at
> the moment. It's not a big issue now as 31 will be always I2C but perhaps it
> might be a good idea to patch drivers/media/video/via-camera.c
Oops!
>
> Jon, do you agree that this patch is useful, at least as long we do not
> dynamically change the configuration?
>
>
> Thanks,
>
> Florian Tobias Schandinat
>
>>
>> Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
>> ---
>> --- a/drivers/video/via/via_i2c.c 2010-12-18 06:42:37.000000000 +0200
>> +++ b/drivers/video/via/via_i2c.c 2010-12-20 19:55:17.000000000 +0200
>> @@ -188,7 +188,7 @@ struct i2c_adapter *viafb_find_i2c_adapt
>> {
>> struct via_i2c_stuff *stuff = &via_i2c_par[which];
>>
>> - return &stuff->adapter;
>> + return stuff->is_active ? &stuff->adapter : NULL;
>> }
>> EXPORT_SYMBOL_GPL(viafb_find_i2c_adapter);
>>
>> --
>>
>>
>
>
>
--
WBR, Dzianis Kahanovich AKA Denis Kaganovich, http://mahatma.bspu.unibel.by/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-04 11:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 19:16 [PATCH] viafb: fix viafb_find_i2c_adapt return value Dzianis Kahanovich
2010-12-29 1:26 ` Florian Tobias Schandinat
2011-01-04 11:16 ` Dzianis Kahanovich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.