diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 16:50:52 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 16:50:52 +0300 |
commit | da42c3c641ea5bcf032170540bf64f5c09db925e (patch) | |
tree | 4e9c78683fd1431789c1b4ee3f3bd1240f0040fb /drivers/media/platform | |
parent | e2aec4901c78dcda33c1f3e7d9eaefe12a3ca213 (diff) | |
download | linux-da42c3c641ea5bcf032170540bf64f5c09db925e.tar.xz |
Revert "[media] coda/imx-vdoa: constify structs"
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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/coda/imx-vdoa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/coda/imx-vdoa.c b/drivers/media/platform/coda/imx-vdoa.c index 67fd8ffa60a4..f61baf7dcbc1 100644 --- a/drivers/media/platform/coda/imx-vdoa.c +++ b/drivers/media/platform/coda/imx-vdoa.c @@ -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 = { |