Commit 25fcf2b7f1f65d2cc12182ced3ccd47576970be4

Authored by Hartmut Knaack
Committed by Grant Likely
1 parent 78a4315872

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 <knaack.h@gmx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/gpio/gpio-pca953x.c
... ... @@ -577,6 +577,7 @@
577 577 void
578 578 pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert)
579 579 {
  580 + *gpio_base = -1;
580 581 }
581 582 #endif
582 583