summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schiller <ms@dev.tdt.de>2024-05-15 10:42:53 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2024-06-08 23:25:35 +0200
commit45eeedbbfc805a26df2c0a0b9c6edca51a4a0895 (patch)
treee3e9fdd9b77d110927c56db23b2cc2be24d5aed3
parent10f8a14eca521801add807bd4491323ce53cf59a (diff)
downloadopenwrt-45eeedbbfc805a26df2c0a0b9c6edca51a4a0895.tar.gz
openwrt-45eeedbbfc805a26df2c0a0b9c6edca51a4a0895.tar.bz2
openwrt-45eeedbbfc805a26df2c0a0b9c6edca51a4a0895.zip
kernel: ltq-vdsl-vr9-mei: fix compilation with linux 6.6
This adds some compile fixes for linux 6.6 compatibility. class_create now require only the name instead of the module ownership reference. Also the kernel enabled checks for enum. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
-rw-r--r--package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch
new file mode 100644
index 0000000000..8df0a31e7e
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch
@@ -0,0 +1,32 @@
+--- a/src/drv_mei_cpe_os.h
++++ b/src/drv_mei_cpe_os.h
+@@ -36,6 +36,15 @@
+ #include "ifxos_select.h"
+ #include "ifx_fifo.h"
+
++/* __BYTE_ORDER is defined in ifxos_linux_common.h and ifxos_linux_drv.h, which
++ * leads to an compile error in include/uapi/linux/aio_abi.h because the
++ * __LITTLE_ENDIAN is still undefined. So let's undef the unwanted __BYTE_ORDER
++ * again here.
++ */
++#ifdef __BYTE_ORDER
++ #undef __BYTE_ORDER
++#endif
++
+ #if defined(IFXOS_HAVE_VERSION_CHECK)
+ # if (IFXOS_VERSION_CHECK_EG_THAN(1,1,0))
+ # define IFXOS_SUPPORTS_FIFO_PEEK 1
+--- a/src/drv_mei_cpe_linux.c
++++ b/src/drv_mei_cpe_linux.c
+@@ -2548,7 +2548,11 @@ static int MEI_InitModuleRegCharDev(cons
+ ("Using major number %d" MEI_DRV_CRLF, major_number));
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+ mei_class = class_create(THIS_MODULE, devName);
++#else
++ mei_class = class_create(devName);
++#endif
+ mei_devt = MKDEV(major_number, 0);
+ device_create(mei_class, NULL, mei_devt, NULL, "%s/%i", devName, 0);
+