Skip to contentSkip to conversation

pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc()

PATCH Applied Bartosz Golaszewski 2 participants 4 messages Jun 18, 2024 – Jun 25, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc()

From: Bartosz Golaszewski <[email protected]>

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.

---
 drivers/pinctrl/pinctrl-da9062.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-da9062.c +1 -1
index 22e3cd2cc963..6f44a13b90ce 100644
@@ -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;
 
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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.

I guess you will apply this to the GPIO tree, else tell me what to do!

Yours,
Linus Walleij

#2 lore raw
Quoted 9 lines · Linus Walleij
Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

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.

Quoted 8 lines
Quoted 1 line

I guess you will apply this to the GPIO tree, else tell me what to do!

Yours,
Linus Walleij

I can, yes. Thank you.

I'll give it some time to possibly get a Tested-by from Dialog.

Bart

author Applied
#3 lore raw
In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Quoted 5 lines · Bartosz Golaszewski

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.

Applied, thanks!

[1/1] pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc()

      commit: 8657af6c0a9afaa11947b7476119834898823b52

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>