gpio-button-hotplug: convert to .remove_new

Convert package to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2025-04-10 21:31:02 +02:00
parent 31139fcdfb
commit 6651efa4ff
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7

View file

@ -674,7 +674,7 @@ static void gpio_keys_irq_close(struct gpio_keys_button_dev *bdev)
} }
} }
static int gpio_keys_remove(struct platform_device *pdev) static void gpio_keys_remove(struct platform_device *pdev)
{ {
struct gpio_keys_button_dev *bdev = platform_get_drvdata(pdev); struct gpio_keys_button_dev *bdev = platform_get_drvdata(pdev);
@ -684,13 +684,11 @@ static int gpio_keys_remove(struct platform_device *pdev)
gpio_keys_polled_close(bdev); gpio_keys_polled_close(bdev);
else else
gpio_keys_irq_close(bdev); gpio_keys_irq_close(bdev);
return 0;
} }
static struct platform_driver gpio_keys_driver = { static struct platform_driver gpio_keys_driver = {
.probe = gpio_keys_probe, .probe = gpio_keys_probe,
.remove = gpio_keys_remove, .remove_new = gpio_keys_remove,
.driver = { .driver = {
.name = "gpio-keys", .name = "gpio-keys",
.of_match_table = of_match_ptr(gpio_keys_of_match), .of_match_table = of_match_ptr(gpio_keys_of_match),
@ -699,7 +697,7 @@ static struct platform_driver gpio_keys_driver = {
static struct platform_driver gpio_keys_polled_driver = { static struct platform_driver gpio_keys_polled_driver = {
.probe = gpio_keys_polled_probe, .probe = gpio_keys_polled_probe,
.remove = gpio_keys_remove, .remove_new = gpio_keys_remove,
.driver = { .driver = {
.name = "gpio-keys-polled", .name = "gpio-keys-polled",
.of_match_table = of_match_ptr(gpio_keys_polled_of_match), .of_match_table = of_match_ptr(gpio_keys_polled_of_match),