From: Hartmut Knaack Date: Mon, 10 Oct 2011 22:22:45 +0000 (+0200) Subject: gpio-pca953x: fix gpio_base X-Git-Tag: v3.1-rc10~4^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=25fcf2b7f1f65d2cc12182ced3ccd47576970be4;p=karo-tx-linux.git gpio-pca953x: fix gpio_base 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 Signed-off-by: Grant Likely --- diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index c43b8ff626a7..0550dcb85814 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