Skip to content

Commit 8d1e84a

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
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>
1 parent 6219132 commit 8d1e84a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpio/gpio-regmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int gpio_regmap_get_direction(struct gpio_chip *chip,
129129
base = gpio_regmap_addr(gpio->reg_dir_in_base);
130130
invert = 1;
131131
} else {
132-
return -EOPNOTSUPP;
132+
return -ENOTSUPP;
133133
}
134134

135135
ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask);
@@ -160,7 +160,7 @@ static int gpio_regmap_set_direction(struct gpio_chip *chip,
160160
base = gpio_regmap_addr(gpio->reg_dir_in_base);
161161
invert = 1;
162162
} else {
163-
return -EOPNOTSUPP;
163+
return -ENOTSUPP;
164164
}
165165

166166
ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask);

0 commit comments

Comments
 (0)