]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Revert "[media] coda/imx-vdoa: constify structs"
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 13:50:52 +0000 (11:50 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 13:50:52 +0000 (11:50 -0200)
Despite checkpatch comments, it seems that ARM doesn't like
to use constified structs.

As reported by kernel build robot:

 In file included from drivers/media/platform/coda/imx-vdoa.c:22:0:
   drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_init':
>> include/linux/device.h:1461:20: warning: passing argument 1 of '__platform_driver_register' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     return __register(&(__driver) , ##__VA_ARGS__); \
                       ^
   include/linux/platform_device.h:198:29: note: in definition of macro 'platform_driver_register'
     __platform_driver_register(drv, THIS_MODULE)
                                ^~~
   include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
>> drivers/media/platform/coda/imx-vdoa.c:333:1: note: in expansion of macro 'module_platform_driver'
    module_platform_driver(vdoa_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/platform_device.h:199:12: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *'
    extern int __platform_driver_register(struct platform_driver *,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/media/platform/coda/imx-vdoa.c:18:0:
   drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_exit':
>> include/linux/device.h:1466:15: warning: passing argument 1 of 'platform_driver_unregister' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     __unregister(&(__driver) , ##__VA_ARGS__); \
                  ^
   include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
>> drivers/media/platform/coda/imx-vdoa.c:333:1: note: in expansion of macro 'module_platform_driver'
    module_platform_driver(vdoa_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/media/platform/coda/imx-vdoa.c:22:0:
   include/linux/platform_device.h:201:13: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *'
    extern void platform_driver_unregister(struct platform_driver *);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~

So, let's just remove it.

This reverts commit 126f52b02e6ec6a25f0b32058a91648304922d4a.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/coda/imx-vdoa.c

index 67fd8ffa60a418f6538d6b358c3e3d91f4f385b6..f61baf7dcbc1cac2fda2d5d2c6c5169949a2be6c 100644 (file)
@@ -315,13 +315,13 @@ static int vdoa_remove(struct platform_device *pdev)
        return 0;
 }
 
-static const struct of_device_id vdoa_dt_ids[] = {
+static struct of_device_id vdoa_dt_ids[] = {
        { .compatible = "fsl,imx6q-vdoa" },
        {}
 };
 MODULE_DEVICE_TABLE(of, vdoa_dt_ids);
 
-static const struct platform_driver vdoa_driver = {
+static struct platform_driver vdoa_driver = {
        .probe          = vdoa_probe,
        .remove         = vdoa_remove,
        .driver         = {