]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
gpio: merrifield: Don't use GPIOF_DIR_IN / GPIOF_DIR_OUT
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 23 Mar 2017 12:56:32 +0000 (14:56 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 23 Mar 2017 13:06:46 +0000 (14:06 +0100)
The mentioned flags are dedicated solely for consumer API.
Replace them by explicit values.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Made a !bang clamp to (0,1) instead of infix ? operator]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-merrifield.c

index f40088d268c174e5cf26ef0a54c6838159d4a4d3..9dbdc3672f5e70514862ebb8e04a1ddce3b796b7 100644 (file)
@@ -166,7 +166,7 @@ static int mrfld_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
 {
        void __iomem *gpdr = gpio_reg(chip, offset, GPDR);
 
-       return (readl(gpdr) & BIT(offset % 32)) ? GPIOF_DIR_OUT : GPIOF_DIR_IN;
+       return !(readl(gpdr) & BIT(offset % 32));
 }
 
 static int mrfld_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,