mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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>
This commit is contained in:
parent
6219132cad
commit
8d1e84ab01
@ -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, ®, &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, ®, &mask);
|
||||
|
Loading…
Reference in New Issue
Block a user