[PATCH 04/25] serial/mpc52xx_uart: add a const qualifier

Subsystems: the rest, tty layer and serial drivers

STALE5056d

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

[PATCH 04/25] serial/mpc52xx_uart: add a const qualifier

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

This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:

	drivers/tty/serial/mpc52xx_uart.c: In function 'mpc52xx_uart_of_enumerate':
	drivers/tty/serial/mpc52xx_uart.c:1440:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Uwe Kleine-König <redacted>
---
 drivers/tty/serial/mpc52xx_uart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index bedac0d..b131f2d 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -598,7 +598,7 @@ static struct psc_ops mpc512x_psc_ops = {
 };
 #endif
 
-static struct psc_ops *psc_ops;
+static const struct psc_ops *psc_ops;
 
 /* ======================================================================== */
 /* UART operations                                                          */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[PATCH 04/25] serial/mpc52xx_uart: add a const qualifier

From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
Date: 2012-07-23 15:31:38

On Mon, Jul 23, 2012 at 11:13:09AM +0200, Uwe Kleine-König wrote:
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:

	drivers/tty/serial/mpc52xx_uart.c: In function 'mpc52xx_uart_of_enumerate':
	drivers/tty/serial/mpc52xx_uart.c:1440:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Uwe Kleine-König <redacted>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help