From 87ae122fd1e1a06ad8d481baf3a44ed3d903f089 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 14 Apr 2026 07:37:23 +0800 Subject: [PATCH] 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: c1fa85f65931 ("treewide: use of_device_get_match_data") Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/22921 Signed-off-by: Robert Marko --- package/kernel/lantiq/ltq-atm/src/ltq_atm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index 1ba2dfb3cb..609b521ad6 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -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;