gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 18 Jul 2022 22:02:51 +0000 (01:02 +0300)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 19 Jul 2022 08:14:37 +0000 (10:14 +0200)
commitd3054ba1db6270e14245efa28dbd1cf10207d4f2
tree4647792d7cbe4ca703807ab67e21f20d9a780135
parent10fcd2f180bcbfb3392fcc98670baff81c61bcf2
gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()

It's logically better to check the IN in ->direction_input() and
_OUT in ->direction_output().

While at it, replace ternary with plain if-conditional for the sake
of consistency with mmio_74xx_dir_out().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-74xx-mmio.c