pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc()
Subsystems (3)
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
@@ -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
Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
In order to finally confine the unsafe
gpiochip_get_desc()todrivers/gpio/, let's convert this driver to using the safer alternative that takes thegpio_deviceas argument.Signed-off-by Bartosz Golaszewski <[email protected]>
I guess you will apply this to the GPIO tree, else tell me what to do!
Yours,
Linus Walleij
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()todrivers/gpio/, let's convert this driver to using the safer alternative that takes thegpio_deviceas argument.
Quoted 8 lines
Quoted 1 line
Signed-off-by Bartosz Golaszewski <[email protected]>Acked-by Linus Walleij <[email protected]>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
Bartosz Golaszewski
AppliedFrom: Bartosz Golaszewski <[email protected]>
Quoted 5 lines · Bartosz Golaszewski
In order to finally confine the unsafe
gpiochip_get_desc()todrivers/gpio/, let's convert this driver to using the safer alternative that takes thegpio_deviceas 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]>