]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: kmod-ltq-atm: fix discarded-qualifiers build error
authorShiji Yang <yangshiji66@outlook.com>
Mon, 13 Apr 2026 23:37:23 +0000 (07:37 +0800)
committerRobert Marko <robimarko@gmail.com>
Thu, 16 Apr 2026 09:34:28 +0000 (11:34 +0200)
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 <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22921
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/lantiq/ltq-atm/src/ltq_atm.c

index 1ba2dfb3cb806c5315499b6575ad6de125c146d0..609b521ad66ab3f5484c3934a33461457e08c02d 100644 (file)
@@ -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;