gpio: pcie-idio-24: Use -ENOTSUPP consistently
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Wed, 10 Apr 2024 06:41:56 +0000 (09:41 +0300)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 12 Apr 2024 19:36:18 +0000 (21:36 +0200)
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>
Acked-by: William Breathitt Gray <wbg@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-pcie-idio-24.c

index 2efd1b1a0805f2c9fa05db1e6905a1ab6b466b4a..7f7f95ad4343d91de13b5c32936bc132f93d6a68 100644 (file)
@@ -267,7 +267,7 @@ static int idio_24_reg_mask_xlate(struct gpio_regmap *const gpio, const unsigned
        case IDIO_24_CONTROL_REG:
                /* We can only set direction for TTL/CMOS lines */
                if (offset < 48)
-                       return -EOPNOTSUPP;
+                       return -ENOTSUPP;
 
                *reg = IDIO_24_CONTROL_REG;
                *mask = CONTROL_REG_OUT_MODE;