[PATCH 18/25] drivers/serial/suncore.c: Use static const char arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
 drivers/serial/suncore.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c
index 6381a02..f2a5b54 100644
--- a/drivers/serial/suncore.c
+++ b/drivers/serial/suncore.c
@@ -84,8 +84,8 @@ EXPORT_SYMBOL(sunserial_console_match);
 
 void sunserial_console_termios(struct console *con, struct device_node *uart_dp)
 {
+	char mode_prop[sizeof("ttyX-mode")];
 	const char *mode, *s;
-	char mode_prop[] = "ttyX-mode";
 	int baud, bits, stop, cflag;
 	char parity;
 
@@ -106,7 +106,7 @@ void sunserial_console_termios(struct console *con, struct device_node *uart_dp)
 		if (of_console_options)
 			c = *of_console_options;
 
-		mode_prop[3] = c;
+		sprintf(mode_prop, "tty%c-mode", c);
 
 		dp = of_find_node_by_path("/options");
 		mode = of_get_property(dp, mode_prop, NULL);
-- 
1.7.3.rc1

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


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux