1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Author: Andreas Beckmann <anbe@debian.org>
Description: Fix building with -Werror=incompatible-pointer-types
--- a/leds-alix.c
+++ b/leds-alix.c
@@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/err.h>
+#include <linux/version.h>
#include <asm/io.h>
#define DRVNAME "alix-led"
@@ -120,12 +121,18 @@ static int alix_led_probe(struct platfor
return ret;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,11,0)
+static void alix_led_remove(struct platform_device *pdev)
+#else
static int alix_led_remove(struct platform_device *pdev)
+#endif
{
led_classdev_unregister(&alix_led_1);
led_classdev_unregister(&alix_led_2);
led_classdev_unregister(&alix_led_3);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
+#endif
}
static struct platform_driver alix_led_driver = {
|