aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-pca953x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 07651d30ba8b..91eb8d4492ef 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -308,7 +308,7 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
308 return 0; 308 return 0;
309 } 309 }
310 310
311 return (reg_val & (1u << off)) ? 1 : 0; 311 return (reg_val & (1u << (off % BANK_SZ))) ? 1 : 0;
312} 312}
313 313
314static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val) 314static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val)