File: incompatible-pointer-types.patch

package info (click to toggle)
leds-alix 0.0.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 136 kB
  • sloc: ansic: 408; makefile: 98
file content (32 lines) | stat: -rw-r--r-- 840 bytes parent folder | download | duplicates (2)
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 = {