summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-08-28 17:23:58 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-09-02 11:47:06 +0200
commit8c045ca534d03bab1ce4b4de49d29a36276a1e35 (patch)
treef47e50cc9c6abb31368c5b7f7052b677ed70cff8 /drivers/gpio
parent4b2b0a2ce8153d65d0829e45e73bf6acdc291344 (diff)
downloadlwn-8c045ca534d03bab1ce4b4de49d29a36276a1e35.tar.gz
lwn-8c045ca534d03bab1ce4b4de49d29a36276a1e35.zip
gpiolib: legacy: Kill GPIOF_DIR_* definitions
Besides the fact that (old) drivers use wrong definitions, e.g., GPIOF_DIR_IN instead of GPIOF_IN, shrink the legacy definitions by killing those GPIOF_DIR_* completely. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20240828142554.2424189-3-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib-legacy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-legacy.c b/drivers/gpio/gpiolib-legacy.c
index 354dd0cc8f2f..f421208ddbdd 100644
--- a/drivers/gpio/gpiolib-legacy.c
+++ b/drivers/gpio/gpiolib-legacy.c
@@ -40,7 +40,7 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
if (flags & GPIOF_ACTIVE_LOW)
set_bit(FLAG_ACTIVE_LOW, &desc->flags);
- if (flags & GPIOF_DIR_IN)
+ if (flags & GPIOF_IN)
err = gpiod_direction_input(desc);
else
err = gpiod_direction_output_raw(desc, !!(flags & GPIOF_OUT_INIT_HIGH));