Skip to content

Commit 25fcf2b

Browse files
Hartmut Knaackglikely
authored andcommitted
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>
1 parent 78a4315 commit 25fcf2b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpio/gpio-pca953x.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert)
577577
void
578578
pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert)
579579
{
580+
*gpio_base = -1;
580581
}
581582
#endif
582583

0 commit comments

Comments
 (0)