[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240618111824.15593-1-brgl@bgdev.pl>
Date: Tue, 18 Jun 2024 13:18:24 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Support Opensource <support.opensource@...semi.com>,
Linus Walleij <linus.walleij@...aro.org>
Cc: linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: [PATCH RFT] pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc()
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
In order to finally confine the unsafe gpiochip_get_desc() to
drivers/gpio/, let's convert this driver to using the safer alternative
that takes the gpio_device as argument.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
---
drivers/pinctrl/pinctrl-da9062.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-da9062.c b/drivers/pinctrl/pinctrl-da9062.c
index 22e3cd2cc963..6f44a13b90ce 100644
--- a/drivers/pinctrl/pinctrl-da9062.c
+++ b/drivers/pinctrl/pinctrl-da9062.c
@@ -139,7 +139,7 @@ static int da9062_gpio_direction_input(struct gpio_chip *gc,
{
struct da9062_pctl *pctl = gpiochip_get_data(gc);
struct regmap *regmap = pctl->da9062->regmap;
- struct gpio_desc *desc = gpiochip_get_desc(gc, offset);
+ struct gpio_desc *desc = gpio_device_get_desc(gc->gpiodev, offset);
unsigned int gpi_type;
int ret;
--
2.43.0
Powered by blists - more mailing lists