gpio: lpc32xx: Make of_device_id array const
Subsystems (3)
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
@@ -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
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
@@ -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
Quoted 14 lines · Jingoo Han
Make
of_device_idarray const, because all OF functions handle it as const.Signed-off-by Jingoo Han <[email protected]>--- drivers/gpio/gpio-lpc32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-lpc32xx.c +0
-0
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" , }, { }, };
RE: [PATCH 2/2] gpio: pxa: Make of_device_id array const
In reply to Jingoo HanQuoted 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: Makeof_device_idarray constMake
of_device_idarray const, because all OF functions handle it as const.Signed-off-by Jingoo Han <[email protected]>--- 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
-042e6e64..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
Quoted 4 lines · Jingoo Han
Make
of_device_idarray const, because all OF functions handle it as const.Signed-off-by Jingoo Han <[email protected]>
Patch applied with Roland's ACK.
Yours,
Linus Walleij