Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: pcie-idio-24: 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>
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>

authored by

Andy Shevchenko and committed by
Bartosz Golaszewski
6219132c 3de14369

+1 -1
+1 -1
drivers/gpio/gpio-pcie-idio-24.c
··· 267 267 case IDIO_24_CONTROL_REG: 268 268 /* We can only set direction for TTL/CMOS lines */ 269 269 if (offset < 48) 270 - return -EOPNOTSUPP; 270 + return -ENOTSUPP; 271 271 272 272 *reg = IDIO_24_CONTROL_REG; 273 273 *mask = CONTROL_REG_OUT_MODE;