]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
gpio-pca953x: fix gpio_base
authorHartmut Knaack <knaack.h@gmx.de>
Mon, 10 Oct 2011 22:22:45 +0000 (00:22 +0200)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 13 Oct 2011 19:49:37 +0000 (13:49 -0600)
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>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/gpio/gpio-pca953x.c

index c43b8ff626a73900b4242833492654de49addf65..0550dcb85814026b9e759abd4c8a81d83b02f9cc 100644 (file)
@@ -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