浏览代码

[POWERPC] Fix constantness of bootwrapper arg

Fixes the constantness of the powerpc bootwrapper's console_ops.write
routine.  Allows printing of constant strings.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Geoff Levand 18 年之前
父节点
当前提交
b96fbb6e1e
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      arch/powerpc/boot/ofconsole.c
  2. 1 1
      arch/powerpc/boot/ops.h
  3. 1 1
      arch/powerpc/boot/serial.c

+ 1 - 1
arch/powerpc/boot/ofconsole.c

@@ -33,7 +33,7 @@ static int of_console_open(void)
 	return -1;
 	return -1;
 }
 }
 
 
-static void of_console_write(char *buf, int len)
+static void of_console_write(const char *buf, int len)
 {
 {
 	of_call_prom("write", 3, 1, of_stdout_handle, buf, len);
 	of_call_prom("write", 3, 1, of_stdout_handle, buf, len);
 }
 }

+ 1 - 1
arch/powerpc/boot/ops.h

@@ -51,7 +51,7 @@ extern struct dt_ops dt_ops;
 /* Console operations */
 /* Console operations */
 struct console_ops {
 struct console_ops {
 	int	(*open)(void);
 	int	(*open)(void);
-	void	(*write)(char *buf, int len);
+	void	(*write)(const char *buf, int len);
 	void	(*edit_cmdline)(char *buf, int len);
 	void	(*edit_cmdline)(char *buf, int len);
 	void	(*close)(void);
 	void	(*close)(void);
 	void	*data;
 	void	*data;

+ 1 - 1
arch/powerpc/boot/serial.c

@@ -27,7 +27,7 @@ static int serial_open(void)
 	return scdp->open();
 	return scdp->open();
 }
 }
 
 
-static void serial_write(char *buf, int len)
+static void serial_write(const char *buf, int len)
 {
 {
 	struct serial_console_data *scdp = console_ops.data;
 	struct serial_console_data *scdp = console_ops.data;