[PATCH 08/25] gpio/mpc8xxx: add a const qualifier

Subsystems: gpio subsystem, the rest

STALE5058d

2 messages, 2 authors, 2012-07-29 · open the first message on its own page

[PATCH 08/25] gpio/mpc8xxx: add a const qualifier

From: Uwe Kleine-König <hidden>
Date: 2012-07-23 09:13:13

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]

Signed-off-by: Uwe Kleine-König <redacted>
---
 drivers/gpio/gpio-mpc8xxx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index 5a1817e..9ae29cc 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)
-- 
1.7.10.4

[PATCH 08/25] gpio/mpc8xxx: add a const qualifier

From: Linus Walleij <hidden>
Date: 2012-07-29 16:13:29

On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-K=F6nig
[off-list ref] wrote:
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]
Signed-off-by: Uwe Kleine-K=F6nig <redacted>
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help