diff options
| author | Aleksander Jan Bajkowski | 2024-06-13 21:00:40 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2024-06-14 12:32:28 +0000 |
| commit | fda7563c9ae23c4f6d09057b8b2372e21e347c6d (patch) | |
| tree | c77d6ae6b83b53e6db252c07bef3f0fef4404ab6 | |
| parent | 932808ebde24f4d7bee89fa6d4433abb0b1841c1 (diff) | |
| download | openwrt-fda7563c9ae23c4f6d09057b8b2372e21e347c6d.tar.gz | |
kernel: ltq-adsl-mei: fix compilation warning on 6.6
Fix compilation warning:
./include/linux/export.h:29:22: error: passing argument 1 of 'class_create' from incompatible pointer type [-Werror=incompatible-pointer-types]
29 | #define THIS_MODULE (&__this_module)
| ~^~~~~~~~~~~~~~~
| |
| struct module *
/home/aleksander/workspace/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-ar9/ltq-adsl-mei/drv_mei_cpe.c:2774:34: note: in expansion of macro 'THIS_MODULE'
2774 | dsl_class = class_create(THIS_MODULE, "ifx_mei");
| ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
from ./include/linux/dma-mapping.h:8,
from ./include/linux/skbuff.h:28,
from ./include/net/net_namespace.h:43,
from ./include/linux/netdevice.h:38,
from /home/aleksander/workspace/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-ar9/ltq-adsl-mei/drv_mei_cpe.c:39:
./include/linux/device/class.h:230:54: note: expected 'const char *' but argument is of type 'struct module *'
230 | struct class * __must_check class_create(const char *name);
| ~~~~~~~~~~~~^~~~
/home/aleksander/workspace/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-ar9/ltq-adsl-mei/drv_mei_cpe.c:2774:21: error: too many arguments to function 'class_create'
2774 | dsl_class = class_create(THIS_MODULE, "ifx_mei");
| ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
| -rw-r--r-- | package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c index b5e7f07319..ba23232ee9 100644 --- a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c +++ b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c @@ -2771,7 +2771,11 @@ static int ltq_mei_probe(struct platform_device *pdev) IFX_MEI_DMSG("Start loopback test...\n"); DFE_Loopback_Test (); #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) dsl_class = class_create(THIS_MODULE, "ifx_mei"); +#else + dsl_class = class_create("ifx_mei"); +#endif device_create(dsl_class, NULL, MKDEV(MEI_MAJOR, 0), NULL, "ifx_mei"); return 0; } |