diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-03-23 14:56:32 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-03-23 14:06:46 +0100 |
commit | 7477e137dcfdf259123815d0e0b02738840ea71e (patch) | |
tree | a3c9a2e527a8ec32fade345bd3347c6b82d90696 /drivers/gpio | |
parent | 4a56e413b50c11df35e6c6909312ce7418848b37 (diff) | |
download | op-kernel-dev-7477e137dcfdf259123815d0e0b02738840ea71e.zip op-kernel-dev-7477e137dcfdf259123815d0e0b02738840ea71e.tar.gz |
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 <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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-merrifield.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c index f40088d..9dbdc36 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, |