1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.12/package/kernel/gpio-button-hotplug/patches/999-fix-kernel-6.12.patch
2024-11-06 10:17:15 +01:00

26 lines
909 B
Diff

diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index 1dd0ff2a1a1abf..8537a93d6a8d2f 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -674,7 +674,11 @@ static void gpio_keys_irq_close(struct gpio_keys_button_dev *bdev)
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int gpio_keys_remove(struct platform_device *pdev)
+#else
+static void gpio_keys_remove(struct platform_device *pdev)
+#endif
{
struct gpio_keys_button_dev *bdev = platform_get_drvdata(pdev);
@@ -685,7 +689,9 @@ static int gpio_keys_remove(struct platform_device *pdev)
else
gpio_keys_irq_close(bdev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
+#endif
}
static struct platform_driver gpio_keys_driver = {