|
@@ -4,6 +4,7 @@
|
|
#include <linux/kernel.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
+#include <linux/version.h>
|
|
|
|
|
|
struct devicemodel_data {
|
|
struct devicemodel_data {
|
|
char *greeting;
|
|
char *greeting;
|
|
@@ -22,14 +23,18 @@ static int devicemodel_probe(struct platform_device *dev)
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
|
static int devicemodel_remove(struct platform_device *dev)
|
|
static int devicemodel_remove(struct platform_device *dev)
|
|
|
|
+#else
|
|
|
|
+static void devicemodel_remove(struct platform_device *dev)
|
|
|
|
+#endif
|
|
{
|
|
{
|
|
pr_info("devicemodel example removed\n");
|
|
pr_info("devicemodel example removed\n");
|
|
|
|
|
|
/* Your device removal code */
|
|
/* Your device removal code */
|
|
-
|
|
|
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
|
return 0;
|
|
return 0;
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
|
|
|
|
static int devicemodel_suspend(struct device *dev)
|
|
static int devicemodel_suspend(struct device *dev)
|