We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e442916 + e3e1143 commit 3cb12d6Copy full SHA for 3cb12d6
examples/devicemodel.c
@@ -4,6 +4,7 @@
4
#include <linux/kernel.h>
5
#include <linux/module.h>
6
#include <linux/platform_device.h>
7
+#include <linux/version.h>
8
9
struct devicemodel_data {
10
char *greeting;
@@ -22,14 +23,18 @@ static int devicemodel_probe(struct platform_device *dev)
22
23
24
return 0;
25
}
-
26
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
27
static int devicemodel_remove(struct platform_device *dev)
28
+#else
29
+static void devicemodel_remove(struct platform_device *dev)
30
+#endif
31
{
32
pr_info("devicemodel example removed\n");
33
34
/* Your device removal code */
35
36
37
38
39
40
static int devicemodel_suspend(struct device *dev)
0 commit comments