[openwrt/openwrt] ltq-vdsl-vr9-mei: convert platform driver .remove to .remove_new

LEDE Commits lede-commits at lists.infradead.org
Tue May 13 13:02:51 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7d6ee4e415de12daa6be56279b686c64c6606353

commit 7d6ee4e415de12daa6be56279b686c64c6606353
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sat May 10 17:19:19 2025 +0800

    ltq-vdsl-vr9-mei: convert platform driver .remove to .remove_new
    
    Convert .remove to .remove_new so that it can be compatible with
    both 6.6 and 6.12 kernels.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/18744
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...rt-platform-driver-.remove-to-.remove_new.patch | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch
new file mode 100644
index 0000000000..9e64e689b6
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch
@@ -0,0 +1,41 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Fri, 9 May 2025 00:54:48 +0800
+Subject: [PATCH] convert platform driver .remove to .remove_new
+
+Fix compilation error on 6.12 kernel:
+
+/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_mei_cpe-1.5.17.6/src/drv_mei_cpe_linux.c:2073:23: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Wincompatible-pointer-types]
+ 2073 |    .remove = __exit_p(ltq_dsl_cpe_mei_remove),
+      |                       ^~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ src/drv_mei_cpe_linux.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/src/drv_mei_cpe_linux.c
++++ b/src/drv_mei_cpe_linux.c
+@@ -2048,13 +2048,12 @@ static int MEI_InstallProcEntry(unsigned
+ #endif
+ 
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
+-static int __exit ltq_dsl_cpe_mei_remove(struct platform_device *pdev)
++static void __exit ltq_dsl_cpe_mei_remove(struct platform_device *pdev)
+ {
+    MEI_module_exit();
+ 
+    /* clear platform */
+    MEI_DEVICE_CFG_VALUE_SET(platform, e_MEI_DEV_PLATFORM_CONFIG_UNKNOWN);
+-   return 0;
+ }
+ 
+ static const struct of_device_id ltq_dsl_cpe_mei_match[] = {
+@@ -2070,7 +2069,7 @@ static struct platform_driver ltq_dsl_cp
+       .owner          = THIS_MODULE,
+       .of_match_table = ltq_dsl_cpe_mei_match,
+    },
+-   .remove = __exit_p(ltq_dsl_cpe_mei_remove),
++   .remove_new = __exit_p(ltq_dsl_cpe_mei_remove),
+ };
+ 
+ static int __init ltq_dsl_cpe_mei_probe(struct platform_device *pdev)




More information about the lede-commits mailing list