aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/prom/printf.c')
-rw-r--r--arch/sparc/prom/printf.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/sparc/prom/printf.c b/arch/sparc/prom/printf.c
index ca869266b9f3..24031971f806 100644
--- a/arch/sparc/prom/printf.c
+++ b/arch/sparc/prom/printf.c
@@ -23,13 +23,14 @@ static char ppbuf[1024];
23 23
24void notrace prom_write(const char *buf, unsigned int n) 24void notrace prom_write(const char *buf, unsigned int n)
25{ 25{
26 char ch; 26 while (n-- != 0) {
27 27 char ch = *buf;
28 while (n != 0) { 28 if (ch == '\n') {
29 --n; 29 char tmp = '\r';
30 if ((ch = *buf++) == '\n') 30 prom_putchar(&tmp);
31 prom_putchar('\r'); 31 }
32 prom_putchar(ch); 32 prom_putchar(buf);
33 buf++;
33 } 34 }
34} 35}
35 36