public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 1/2] gpio-pca953x: fix gpio_base and add verbosity
@ 2011-10-10 22:22 Hartmut Knaack
  2011-10-13 19:46 ` Grant Likely
  0 siblings, 1 reply; 3+ messages in thread
From: Hartmut Knaack @ 2011-10-10 22:22 UTC (permalink / raw)
  To: Grant Likely; +Cc: linux-kernel

gpio_base was set to 0 if no system platform data or open firmware
platform data was provided. This led to conflicts, if any other gpiochip
with a gpiobase of 0 was instantiated already. Setting it to -1 will
automatically use the first one available.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
-------------------------------------------------------------
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index c43b8ff..ae479fd 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -577,6 +577,7 @@ pca953x_get_alt_pdata(struct i2c_client *client, int
*gpio_base, int *invert)
 void
 pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int
*invert)
 {
+  *gpio_base = -1;
 }
 #endif
 


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

* Re: [Patch 1/2] gpio-pca953x: fix gpio_base and add verbosity
  2011-10-10 22:22 [Patch 1/2] gpio-pca953x: fix gpio_base and add verbosity Hartmut Knaack
@ 2011-10-13 19:46 ` Grant Likely
  2011-10-13 19:52   ` Grant Likely
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2011-10-13 19:46 UTC (permalink / raw)
  To: Hartmut Knaack; +Cc: linux-kernel

On Tue, Oct 11, 2011 at 12:22:45AM +0200, Hartmut Knaack wrote:
> gpio_base was set to 0 if no system platform data or open firmware
> platform data was provided. This led to conflicts, if any other gpiochip
> with a gpiobase of 0 was instantiated already. Setting it to -1 will
> automatically use the first one available.
> 
> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
> -------------------------------------------------------------

Corrupt patch (linewrap and whitespace damage).  Please check your mailer.

> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index c43b8ff..ae479fd 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -577,6 +577,7 @@ pca953x_get_alt_pdata(struct i2c_client *client, int
> *gpio_base, int *invert)
>  void
>  pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int
> *invert)
>  {
> +  *gpio_base = -1;
>  }
>  #endif
>  
> 

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

* Re: [Patch 1/2] gpio-pca953x: fix gpio_base and add verbosity
  2011-10-13 19:46 ` Grant Likely
@ 2011-10-13 19:52   ` Grant Likely
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2011-10-13 19:52 UTC (permalink / raw)
  To: Hartmut Knaack; +Cc: linux-kernel

On Thu, Oct 13, 2011 at 1:46 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Tue, Oct 11, 2011 at 12:22:45AM +0200, Hartmut Knaack wrote:
>> gpio_base was set to 0 if no system platform data or open firmware
>> platform data was provided. This led to conflicts, if any other gpiochip
>> with a gpiobase of 0 was instantiated already. Setting it to -1 will
>> automatically use the first one available.
>>
>> Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
>> -------------------------------------------------------------
>
> Corrupt patch (linewrap and whitespace damage).  Please check your mailer.

I applied it manually though.

g.

>
>> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
>> index c43b8ff..ae479fd 100644
>> --- a/drivers/gpio/gpio-pca953x.c
>> +++ b/drivers/gpio/gpio-pca953x.c
>> @@ -577,6 +577,7 @@ pca953x_get_alt_pdata(struct i2c_client *client, int
>> *gpio_base, int *invert)
>>  void
>>  pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int
>> *invert)
>>  {
>> +  *gpio_base = -1;
>>  }
>>  #endif
>>
>>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

end of thread, other threads:[~2011-10-13 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-10 22:22 [Patch 1/2] gpio-pca953x: fix gpio_base and add verbosity Hartmut Knaack
2011-10-13 19:46 ` Grant Likely
2011-10-13 19:52   ` Grant Likely

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