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

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>

authored by

Andy Shevchenko and committed by
Bartosz Golaszewski
8d1e84ab 6219132c

+2 -2
+2 -2
drivers/gpio/gpio-regmap.c
··· 129 129 base = gpio_regmap_addr(gpio->reg_dir_in_base); 130 130 invert = 1; 131 131 } else { 132 - return -EOPNOTSUPP; 132 + return -ENOTSUPP; 133 133 } 134 134 135 135 ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask); ··· 160 160 base = gpio_regmap_addr(gpio->reg_dir_in_base); 161 161 invert = 1; 162 162 } else { 163 - return -EOPNOTSUPP; 163 + return -ENOTSUPP; 164 164 } 165 165 166 166 ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask);