gpio: rcar: use new pinctrl GPIO helpers
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 3 Oct 2023 07:21:14 +0000 (09:21 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 4 Nov 2023 09:23:18 +0000 (10:23 +0100)
Replace the pinctrl helpers taking the global GPIO number as argument
with the improved variants that instead take a pointer to the GPIO chip
and the controller-relative offset.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-rcar.c

index d8b1baae63575917eb1dec614338496f73e06943..47121e1a6d4e2f90c8dc0e8cba853f395e5a7b2e 100644 (file)
@@ -275,7 +275,7 @@ static int gpio_rcar_request(struct gpio_chip *chip, unsigned offset)
                return error;
        }
 
-       error = pinctrl_gpio_request(chip->base + offset);
+       error = pinctrl_gpio_request_new(chip, offset);
        if (error)
                pm_runtime_put(p->dev);
 
@@ -286,7 +286,7 @@ static void gpio_rcar_free(struct gpio_chip *chip, unsigned offset)
 {
        struct gpio_rcar_priv *p = gpiochip_get_data(chip);
 
-       pinctrl_gpio_free(chip->base + offset);
+       pinctrl_gpio_free_new(chip, offset);
 
        /*
         * Set the GPIO as an input to ensure that the next GPIO request won't