mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 14:50:15 +04:00
kernel: kmod-ltq-atm: fix discarded-qualifiers build error
Fixes:
ltq_atm.c: In function 'ltq_atm_probe':
ltq_atm.c:1840:36: error: passing argument 2 of 'platform_set_drvdata' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
1840 | platform_set_drvdata(pdev, ops);
| ^~~
In file included from ltq_atm.c:40:
/workspaces/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/linux-6.18.21/include/linux/platform_device.h:276:47: note: expected 'void *' but argument is of type 'const struct ltq_atm_ops *'
276 | void *data)
| ~~~~~~^~~~
Fixes: c1fa85f659 ("treewide: use of_device_get_match_data")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22921
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
@@ -1837,7 +1837,7 @@ static int ltq_atm_probe(struct platform_device *pdev)
|
||||
|
||||
ifx_atm_version(ops, ver_str);
|
||||
printk(KERN_INFO "%s", ver_str);
|
||||
platform_set_drvdata(pdev, ops);
|
||||
platform_set_drvdata(pdev, (void *)ops);
|
||||
printk("ifxmips_atm: ATM init succeed\n");
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user