From: Andy Shevchenko Date: Thu, 23 Mar 2017 12:56:32 +0000 (+0200) Subject: gpio: merrifield: Don't use GPIOF_DIR_IN / GPIOF_DIR_OUT X-Git-Tag: v4.12-rc1~100^2~28 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7477e137dcfdf259123815d0e0b02738840ea71e;p=karo-tx-linux.git gpio: merrifield: Don't use GPIOF_DIR_IN / GPIOF_DIR_OUT The mentioned flags are dedicated solely for consumer API. Replace them by explicit values. Signed-off-by: Andy Shevchenko [Made a !bang clamp to (0,1) instead of infix ? operator] Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c index f40088d268c1..9dbdc3672f5e 100644 --- a/drivers/gpio/gpio-merrifield.c +++ b/drivers/gpio/gpio-merrifield.c @@ -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,