gpio: amdpt: remove remove()
PATCH 1/1 gpio: amdpt: remove remove()
From: Bartosz Golaszewski <[email protected]>
Use the managed variant of gpiochip_add_data() and remove the remove() callback.
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/gpio/gpio-amdpt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/gpio/gpio-amdpt.c +1 -9
@@ -106,7 +106,7 @@ static int pt_gpio_probe(struct platform_device *pdev) pt_gpio->gc.free = pt_gpio_free; pt_gpio->gc.ngpio = (uintptr_t )device_get_match_data (dev); - ret =gpiochip_add_data (&pt_gpio->gc, pt_gpio); + ret =devm_gpiochip_add_data (dev, &pt_gpio->gc, pt_gpio);if (ret) {dev_err (dev,"Failed to register GPIO lib\n" );return ret;
@@ -122,13 +122,6 @@ static int pt_gpio_probe(struct platform_device *pdev)return ret; } -static void pt_gpio_remove (struct platform_device *pdev) -{ -struct pt_gpio_chip *pt_gpio =platform_get_drvdata (pdev); - -gpiochip_remove (&pt_gpio->gc); -} -static const struct acpi_device_id pt_gpio_acpi_match[] = { {"AMDF030" ,PT_TOTAL_GPIO }, {"AMDIF030" ,PT_TOTAL_GPIO },
@@ -143,7 +136,6 @@ static struct platform_driver pt_gpio_driver = { .acpi_match_table = ACPI_PTR(pt_gpio_acpi_match), }, .probe = pt_gpio_probe, - .remove_new = pt_gpio_remove, };module_platform_driver (pt_gpio_driver);
Signature · 1 line
2.43.0
Quoted 6 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
Use the managed variant of
gpiochip_add_data()and remove theremove()callback.Signed-off-by Bartosz Golaszewski <[email protected]>
Reviewed-by Linus Walleij <[email protected]>
Yours,
Linus Walleij
Bartosz Golaszewski
AppliedFrom: Bartosz Golaszewski <[email protected]>
Quoted 4 lines · Bartosz Golaszewski
Use the managed variant of
gpiochip_add_data()and remove theremove()callback.
Applied, thanks!
[1/1] gpio: amdpt: remove remove()
commit: 9a94580120bff8040e84e2d500f8f462f8704dc5
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>