diff mbox

[07/25] gpio/gpio-omap.c: add a const qualifier

Message ID 1343034810-3386-8-git-send-email-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Uwe Kleine-König July 23, 2012, 9:13 a.m. UTC
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:

	drivers/gpio/gpio-omap.c: In function 'omap_gpio_probe':
	drivers/gpio/gpio-omap.c:1060: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-omap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij July 29, 2012, 4:13 p.m. UTC | #1
On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
>         drivers/gpio/gpio-omap.c: In function 'omap_gpio_probe':
>         drivers/gpio/gpio-omap.c:1060: warning: assignment discards qualifiers from pointer target type
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Santosh Shilimkar July 30, 2012, 8:18 a.m. UTC | #2
On Monday 23 July 2012 11:13 AM, Uwe Kleine-König wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> 	drivers/gpio/gpio-omap.c: In function 'omap_gpio_probe':
> 	drivers/gpio/gpio-omap.c:1060: warning: assignment discards qualifiers from pointer target type
>
> Signed-off-by: Uwe Kleine-König<u.kleine-koenig@pengutronix.de>
> ---
Looks fine to me. Thanks

Acked-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
diff mbox

Patch

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c4ed172..019cb7b 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1050,7 +1050,7 @@  static int __devinit omap_gpio_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->of_node;
 	const struct of_device_id *match;
-	struct omap_gpio_platform_data *pdata;
+	const struct omap_gpio_platform_data *pdata;
 	struct resource *res;
 	struct gpio_bank *bank;
 	int ret = 0;