aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorCharles Keepax2017-04-19 10:30:44 +0100
committerLinus Walleij2017-04-24 16:22:14 +0200
commit64c6a71126fdeb2d60e193b93e24ea5ffa9c40ba (patch)
tree2ee7c5f669148f53b9f2ea82a005db3cc2cb88ce /drivers/gpio
parent42fcb203e3a8682c41b6a22d2b3fd1457b407fb9 (diff)
gpio: arizona: Correct check whether the pin is an input
The logic to check if the pin is an input or output whilst testing if we need to read the register value from the hardware or not is currently inverted. Remove the erroneous not from the if statement. Fixes: 11598d174050 ("gpio: arizona: Correct handling for reading input GPIOs") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-arizona.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index 60b3102279f3..cd23fd727f95 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -51,7 +51,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
return ret;
/* Resume to read actual registers for input pins */
- if (!(val & ARIZONA_GPN_DIR)) {
+ if (val & ARIZONA_GPN_DIR) {
ret = pm_runtime_get_sync(chip->parent);
if (ret < 0) {
dev_err(chip->parent, "Failed to resume: %d\n", ret);