lantiq: Fix compile of lantiq components with kernel 6.1
[openwrt/openwrt.git] / package / kernel / lantiq / ltq-vdsl-vr9-mei / patches / 400-kernel-6.1.patch
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch
new file mode 100644 (file)
index 0000000..a1efdb7
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/src/drv_mei_cpe_linux.c
++++ b/src/drv_mei_cpe_linux.c
+@@ -1873,7 +1873,11 @@ static int mei_seq_single_show(struct se
+ static int mei_proc_single_open(struct inode *inode, struct file *file)
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+    return single_open(file, mei_seq_single_show, PDE_DATA(inode));
++#else
++   return single_open(file, mei_seq_single_show, pde_data(inode));
++#endif
+ }
+ static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
+--- a/src/drv_mei_cpe_linux_proc_config.c
++++ b/src/drv_mei_cpe_linux_proc_config.c
+@@ -1036,7 +1036,11 @@ static int mei_seq_single_show(struct se
+ static int mei_proc_single_open(struct inode *inode, struct file *file)
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+       return single_open(file, mei_seq_single_show, PDE_DATA(inode));
++#else
++      return single_open(file, mei_seq_single_show, pde_data(inode));
++#endif
+ }
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))