[PATCH 18/36] pinctrl: starfive: use new pinctrl GPIO helpers

From: Bartosz Golaszewski
Date: Tue Oct 03 2023 - 10:52:22 EST


From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>

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@xxxxxxxxxx>
---
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++--
drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
index 530fe340a9a1..22a2db8fa315 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
@@ -918,12 +918,12 @@ static struct pinctrl_desc starfive_desc = {

static int starfive_gpio_request(struct gpio_chip *gc, unsigned int gpio)
{
- return pinctrl_gpio_request(gc->base + gpio);
+ return pinctrl_gpio_request_new(gc, gpio);
}

static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio)
{
- pinctrl_gpio_free(gc->base + gpio);
+ pinctrl_gpio_free_new(gc, gpio);
}

static int starfive_gpio_get_direction(struct gpio_chip *gc, unsigned int gpio)
diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
index 640f827a9b2c..5557ef3fbeb2 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
@@ -547,12 +547,12 @@ static const struct pinconf_ops jh7110_pinconf_ops = {

static int jh7110_gpio_request(struct gpio_chip *gc, unsigned int gpio)
{
- return pinctrl_gpio_request(gc->base + gpio);
+ return pinctrl_gpio_request_new(gc, gpio);
}

static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio)
{
- pinctrl_gpio_free(gc->base + gpio);
+ pinctrl_gpio_free_new(gc, gpio);
}

static int jh7110_gpio_get_direction(struct gpio_chip *gc,
--
2.39.2