From f6817a2c2ebaaaed95b96cd0f04559ba555f4096 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Mon, 21 May 2012 21:57:39 +0200 Subject: gpio/gpio-omap.c: add a const qualifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Linus Walleij Signed-off-by: Uwe Kleine-König --- drivers/gpio/gpio-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio') diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index e6efd77668f..cc0b46df777 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1058,7 +1058,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; -- cgit v1.2.3-70-g09d2 From 01a04ddc86f904eff65e1668cf6524a58203fe2d Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Mon, 21 May 2012 21:57:39 +0200 Subject: gpio/mpc8xxx: add a const qualifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This prepares *of_device_id.data becoming const. Without this change the following warning would occur: drivers/gpio/gpio-mpc8xxx.c: In function 'mpc8xxx_add_controller': drivers/gpio/gpio-mpc8xxx.c:360:30: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Acked-by: Linus Walleij Acked-by: Benjamin Herrenschmidt Signed-off-by: Uwe Kleine-König --- drivers/gpio/gpio-mpc8xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio') diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 5a1817eedd1..9ae29cc0d17 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -38,7 +38,7 @@ struct mpc8xxx_gpio_chip { */ u32 data; struct irq_domain *irq; - void *of_dev_id_data; + const void *of_dev_id_data; }; static inline u32 mpc8xxx_gpio2mask(unsigned int gpio) -- cgit v1.2.3-70-g09d2 From c06e6769a89ae6fe7a2eb429224fa30cacdccdb1 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Fri, 6 Jul 2012 22:20:15 +0200 Subject: gpio/gpio-omap: make platformdata used as *of_device_id.data const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since of_device_id.data is declared as a pointer to const data a few more consts can be added in this driver. Acked-by: Linus Walleij Acked-by: Santosh Shilimkar Signed-off-by: Uwe Kleine-König --- drivers/gpio/gpio-omap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpio') diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index cc0b46df777..0725d181581 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1440,19 +1440,19 @@ static struct omap_gpio_reg_offs omap4_gpio_regs = { .fallingdetect = OMAP4_GPIO_FALLINGDETECT, }; -static struct omap_gpio_platform_data omap2_pdata = { +const static struct omap_gpio_platform_data omap2_pdata = { .regs = &omap2_gpio_regs, .bank_width = 32, .dbck_flag = false, }; -static struct omap_gpio_platform_data omap3_pdata = { +const static struct omap_gpio_platform_data omap3_pdata = { .regs = &omap2_gpio_regs, .bank_width = 32, .dbck_flag = true, }; -static struct omap_gpio_platform_data omap4_pdata = { +const static struct omap_gpio_platform_data omap4_pdata = { .regs = &omap4_gpio_regs, .bank_width = 32, .dbck_flag = true, -- cgit v1.2.3-70-g09d2