aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorGravatar Andy Shevchenko <andy.shevchenko@gmail.com> 2024-04-10 09:39:30 +0300
committerGravatar Bartosz Golaszewski <bartosz.golaszewski@linaro.org> 2024-04-12 21:36:40 +0200
commit8d1e84ab0176c2d2b49fd741d6609a021ecc1d01 (patch)
tree54c5d5e95bf422da685dd83941f03c23bdb458a9 /drivers/gpio
parentgpio: pcie-idio-24: Use -ENOTSUPP consistently (diff)
downloadlinux-8d1e84ab0176c2d2b49fd741d6609a021ecc1d01.tar.gz
linux-8d1e84ab0176c2d2b49fd741d6609a021ecc1d01.tar.bz2
linux-8d1e84ab0176c2d2b49fd741d6609a021ecc1d01.zip
gpio: regmap: Use -ENOTSUPP consistently
The GPIO library expects the drivers to return -ENOTSUPP in some cases and not using analogue POSIX code. Make the driver to follow this. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-regmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
index c08c8e528867..71684dee2ca5 100644
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -129,7 +129,7 @@ static int gpio_regmap_get_direction(struct gpio_chip *chip,
base = gpio_regmap_addr(gpio->reg_dir_in_base);
invert = 1;
} else {
- return -EOPNOTSUPP;
+ return -ENOTSUPP;
}
ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask);
@@ -160,7 +160,7 @@ static int gpio_regmap_set_direction(struct gpio_chip *chip,
base = gpio_regmap_addr(gpio->reg_dir_in_base);
invert = 1;
} else {
- return -EOPNOTSUPP;
+ return -ENOTSUPP;
}
ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask);