diff mbox series

[v1,1/1] gpio: pcie-idio-24: Use -ENOTSUPP consistently

Message ID 20240410064156.1199493-1-andy.shevchenko@gmail.com
State New
Headers show
Series [v1,1/1] gpio: pcie-idio-24: Use -ENOTSUPP consistently | expand

Commit Message

Andy Shevchenko April 10, 2024, 6:41 a.m. UTC
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>
---
 drivers/gpio/gpio-pcie-idio-24.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij April 12, 2024, 10:28 a.m. UTC | #1
On Wed, Apr 10, 2024 at 8:41 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:

> 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: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Bartosz Golaszewski April 12, 2024, 7:37 p.m. UTC | #2
On Wed, Apr 10, 2024 at 8:41 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> 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>
> ---
>  drivers/gpio/gpio-pcie-idio-24.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-pcie-idio-24.c b/drivers/gpio/gpio-pcie-idio-24.c
> index 2efd1b1a0805f..7f7f95ad4343d 100644
> --- a/drivers/gpio/gpio-pcie-idio-24.c
> +++ b/drivers/gpio/gpio-pcie-idio-24.c
> @@ -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;
> --
> 2.44.0
>

Applied, thanks!

Bart
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-pcie-idio-24.c b/drivers/gpio/gpio-pcie-idio-24.c
index 2efd1b1a0805f..7f7f95ad4343d 100644
--- a/drivers/gpio/gpio-pcie-idio-24.c
+++ b/drivers/gpio/gpio-pcie-idio-24.c
@@ -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;