• Mauro Carvalho Chehab's avatar
    Revert "[media] coda/imx-vdoa: constify structs" · da42c3c6
    Mauro Carvalho Chehab authored
    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 126f52b0.
    Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    da42c3c6
imx-vdoa.c 7.81 KB