Skip to contentSkip to conversation

gpio: lpc32xx: Make of_device_id array const

PATCH In review Jingoo Han 4 participants 5 messages Jun 3, 2014 – Jun 12, 2014

Subsystems (3)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 gpio: lpc32xx: Make of_device_id array const

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

---
 drivers/gpio/gpio-lpc32xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-lpc32xx.c +1 -1
index 225344d..b9b9799 100644
@@ -560,7 +560,7 @@ static int lpc32xx_gpio_probe(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id lpc32xx_gpio_of_match[] = {
+static const struct of_device_id lpc32xx_gpio_of_match[] = {
 	{ .compatible = "nxp,lpc3220-gpio", },
 	{ },
 };
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 gpio: pxa: Make of_device_id array const

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

---
 drivers/gpio/gpio-pxa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-pxa.c +1 -1
index 42e6e64..52bbda0 100644
@@ -498,7 +498,7 @@ static int pxa_gpio_nums(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id pxa_gpio_dt_ids[] = {
+static const struct of_device_id pxa_gpio_dt_ids[] = {
 	{ .compatible = "intel,pxa25x-gpio",	.data = &pxa25x_id, },
 	{ .compatible = "intel,pxa26x-gpio",	.data = &pxa26x_id, },
 	{ .compatible = "intel,pxa27x-gpio",	.data = &pxa27x_id, },
Signature · 1 line
1.7.10.4
Acked-by on v1 1/2
#3 lore raw
In reply to Jingoo Han
Quoted 14 lines · Jingoo Han

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

---
 drivers/gpio/gpio-lpc32xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-lpc32xx.c +0 -0
index 225344d..b9b9799 100644

drivers/gpio/gpio-lpc32xx.c static int lpc32xx_gpio_probe(struct platform_device *pdev) · line 566

Quoted 8 lines
drivers/gpio/gpio-lpc32xx.c +1 -1
@@ -560,7 +560,7 @@ static int lpc32xx_gpio_probe(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id lpc32xx_gpio_of_match[] = {
+static const struct of_device_id lpc32xx_gpio_of_match[] = {
 	{ .compatible = "nxp,lpc3220-gpio", },
 	{ },
 };
Acked-by on v1 2/2
#2 lore raw

RE: [PATCH 2/2] gpio: pxa: Make of_device_id array const

In reply to Jingoo Han
Quoted 30 lines

-----Original Message-----
From: Jingoo Han [mailto:[email protected]]
Sent: 2014年6月3日 20:10
To: 'Linus Walleij'
Cc: 'Alexandre Courbot'; [email protected]; 'Jingoo Han'; Neil Zhang; 'Eric Miao'
Subject: [PATCH 2/2] gpio: pxa: Make of_device_id array const

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

---
 drivers/gpio/gpio-pxa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-pxa.c index renamed from drivers/gpio/gpio-pxa.c +0 -0

42e6e64..52bbda0 100644

drivers/gpio/gpio-pxa.c +1 -2
@@ -498,7 +498,7 @@ static int pxa_gpio_nums(struct platform_device
 *pdev)  }
 
 #ifdef CONFIG_OF
-static struct of_device_id pxa_gpio_dt_ids[] = {
+static const struct of_device_id pxa_gpio_dt_ids[] = {
 	{ .compatible = "intel,pxa25x-gpio",	.data = &pxa25x_id, },
 	{ .compatible = "intel,pxa26x-gpio",	.data = &pxa26x_id, },
 	{ .compatible = "intel,pxa27x-gpio",	.data = &pxa27x_id, },
--
Quoted 2 lines

1.7.10.4

Best Regards,
Neil Zhang