Skip to contentSkip to conversation

watchdog: xilinx: Make of_device_id array const

PATCH In review Jingoo Han 4 participants 4 messages May 7, 2014 – May 26, 2014

Subsystems (3)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 watchdog: xilinx: Make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

---
 drivers/watchdog/of_xilinx_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/of_xilinx_wdt.c +1 -1
index 57ccae8..1e6e28d 100644
@@ -225,7 +225,7 @@ static int xwdt_remove(struct platform_device *pdev)
 }
 
 /* Match table for of_platform binding */
-static struct of_device_id xwdt_of_match[] = {
+static const struct of_device_id xwdt_of_match[] = {
 	{ .compatible = "xlnx,xps-timebase-wdt-1.00.a", },
 	{ .compatible = "xlnx,xps-timebase-wdt-1.01.a", },
 	{},
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Jingoo Han

Make of_device_id array const, because all OF functions handle it as const.

---
 drivers/watchdog/of_xilinx_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/of_xilinx_wdt.c +0 -0
index 57ccae8..1e6e28d 100644

drivers/watchdog/of_xilinx_wdt.c static int xwdt_remove(struct platform_device *pdev) · line 231

Quoted 8 lines
drivers/watchdog/of_xilinx_wdt.c +1 -1
@@ -225,7 +225,7 @@ static int xwdt_remove(struct platform_device *pdev)
 }
 
 /* Match table for of_platform binding */
-static struct of_device_id xwdt_of_match[] = {
+static const struct of_device_id xwdt_of_match[] = {
 	{ .compatible = "xlnx,xps-timebase-wdt-1.00.a", },
 	{ .compatible = "xlnx,xps-timebase-wdt-1.01.a", },
 	{},

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
#3 lore raw
In reply to Jingoo Han

Hi Jingoo,

Quoted 13 lines

Make of_device_id array const, because all OF functions handle it as const.

---
 drivers/watchdog/of_xilinx_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/of_xilinx_wdt.c +0 -0
index 57ccae8..1e6e28d 100644

drivers/watchdog/of_xilinx_wdt.c static int xwdt_remove(struct platform_device *pdev) · line 231

Quoted 8 lines
drivers/watchdog/of_xilinx_wdt.c +1 -1
@@ -225,7 +225,7 @@ static int xwdt_remove(struct platform_device *pdev)
 }
 
 /* Match table for of_platform binding */
-static struct of_device_id xwdt_of_match[] = {
+static const struct of_device_id xwdt_of_match[] = {
 	{ .compatible = "xlnx,xps-timebase-wdt-1.00.a", },
 	{ .compatible = "xlnx,xps-timebase-wdt-1.01.a", },
 	{},

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.