1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Add alpha version for kernel 6.12 support

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-11-06 10:17:15 +01:00
parent 2d47118221
commit 6e713f6367
281 changed files with 65491 additions and 0 deletions

View file

@ -0,0 +1,42 @@
--- a/ubootenv-nvram.c
+++ b/ubootenv-nvram.c
@@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
+#include <linux/version.h>
#define NAME "ubootenv"
@@ -132,18 +133,30 @@ static int ubootenv_probe(struct platfor
return misc_register(&data->misc);
}
-static int ubootenv_remove(struct platform_device *pdev)
+static
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
+int
+#else
+void
+#endif
+ubootenv_remove(struct platform_device *pdev)
{
struct ubootenv_drvdata *data = platform_get_drvdata(pdev);
data->env = NULL;
misc_deregister(&data->misc);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
return 0;
+#endif
}
static struct platform_driver ubootenv_driver = {
.probe = ubootenv_probe,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
.remove = ubootenv_remove,
+#else
+ .remove_new = ubootenv_remove,
+#endif
.driver = {
.name = NAME,
.owner = THIS_MODULE,