Skip to content

Commit b04ce10

Browse files
author
Bartosz Golaszewski
committed
pinctrl: stm32: drop wrappers around pinctrl_gpio_free/input()
pinctrl_gpio_*() helpers now have signatures corresponding with those of the GPIOLIB callbacks. We can drop the wrappers. Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Linus Walleij <[email protected]>
1 parent 895bf1d commit b04ce10

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

drivers/pinctrl/stm32/pinctrl-stm32.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,6 @@ static int stm32_gpio_request(struct gpio_chip *chip, unsigned offset)
220220
return pinctrl_gpio_request(chip, offset);
221221
}
222222

223-
static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset)
224-
{
225-
pinctrl_gpio_free(chip, offset);
226-
}
227-
228223
static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset)
229224
{
230225
struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
@@ -239,11 +234,6 @@ static void stm32_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
239234
__stm32_gpio_set(bank, offset, value);
240235
}
241236

242-
static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
243-
{
244-
return pinctrl_gpio_direction_input(chip, offset);
245-
}
246-
247237
static int stm32_gpio_direction_output(struct gpio_chip *chip,
248238
unsigned offset, int value)
249239
{
@@ -316,10 +306,10 @@ static int stm32_gpio_init_valid_mask(struct gpio_chip *chip,
316306

317307
static const struct gpio_chip stm32_gpio_template = {
318308
.request = stm32_gpio_request,
319-
.free = stm32_gpio_free,
309+
.free = pinctrl_gpio_free,
320310
.get = stm32_gpio_get,
321311
.set = stm32_gpio_set,
322-
.direction_input = stm32_gpio_direction_input,
312+
.direction_input = pinctrl_gpio_direction_input,
323313
.direction_output = stm32_gpio_direction_output,
324314
.to_irq = stm32_gpio_to_irq,
325315
.get_direction = stm32_gpio_get_direction,
@@ -381,7 +371,7 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data)
381371
struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent);
382372
int ret;
383373

384-
ret = stm32_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq);
374+
ret = pinctrl_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq);
385375
if (ret)
386376
return ret;
387377

0 commit comments

Comments
 (0)