Skip to contentSkip to conversation

mtd: st_spi_fsm: Make of_device_id array const

PATCH In review Jingoo Han 5 participants 7 messages May 7, 2014 – May 12, 2014

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/3 mtd: st_spi_fsm: Make of_device_id array const

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

---
 drivers/mtd/devices/st_spi_fsm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/devices/st_spi_fsm.c +1 -1
index f97fe14..d252514 100644
@@ -2058,7 +2058,7 @@ static int stfsm_remove(struct platform_device *pdev)
 	return mtd_device_unregister(&fsm->mtd);
 }
 
-static struct of_device_id stfsm_match[] = {
+static const struct of_device_id stfsm_match[] = {
 	{ .compatible = "st,spi-fsm", },
 	{},
 };
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/3 mtd: nand: pxa3xx: Make of_device_id array const

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

---
 drivers/mtd/nand/pxa3xx_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/pxa3xx_nand.c +1 -1
index 7588fe2..940e6c7 100644
@@ -337,7 +337,7 @@ static struct nand_ecclayout ecc_layout_4KB_bch8bit = {
 /* convert nano-seconds to nand flash controller clock cycles */
 #define ns2cycle(ns, clk)	(int)((ns) * (clk / 1000000) / 1000)
 
-static struct of_device_id pxa3xx_nand_dt_ids[] = {
+static const struct of_device_id pxa3xx_nand_dt_ids[] = {
 	{
 		.compatible = "marvell,pxa3xx-nand",
 		.data       = (void *)PXA3XX_NAND_VARIANT_PXA,
Signature · 1 line
1.7.10.4
#3 lore raw

Re: [PATCH 2/3] mtd: nand: pxa3xx: Make of_device_id array const

Quoted 11 lines · Jason Cooper
Quoted 7 lines · Jingoo Han

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

---
 drivers/mtd/nand/pxa3xx_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 3 lines
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
author
#4 lore raw

PATCH 3/3 mtd: orion_nand: Make of_device_id array const

In reply to Jingoo Han

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

---
 drivers/mtd/nand/orion_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/orion_nand.c +1 -1
index dd7fe81..471b4df 100644
@@ -214,7 +214,7 @@ static int orion_nand_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id orion_nand_of_match_table[] = {
+static const struct of_device_id orion_nand_of_match_table[] = {
 	{ .compatible = "marvell,orion-nand", },
 	{},
 };
Signature · 1 line
1.7.10.4
Acked-by on v1 3/3
#5 lore raw

Re: [PATCH 3/3] mtd: orion_nand: Make of_device_id array const

Quoted 13 lines · Jingoo Han

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

---
 drivers/mtd/nand/orion_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/orion_nand.c +0 -0
index dd7fe81..471b4df 100644

drivers/mtd/nand/orion_nand.c static int orion_nand_remove(struct platform_device *pdev) · line 220

Quoted 8 lines
drivers/mtd/nand/orion_nand.c +1 -1
@@ -214,7 +214,7 @@ static int orion_nand_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id orion_nand_of_match_table[] = {
+static const struct of_device_id orion_nand_of_match_table[] = {
 	{ .compatible = "marvell,orion-nand", },
 	{},
 };

Andrew