[RFC 2/8] sparc: prom: Use the return value from prom_nbputchar()

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

 



As prom_nbputchar() now returns 1 when it succeeds, use it instead
of decrementing len or incrementing buf - as this matches the
behaviour of prom_console_write_buf() in console_64.c

Signed-off-by: Julian Calaby <julian.calaby@xxxxxxxxx>
---
 arch/sparc/prom/console_32.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/prom/console_32.c b/arch/sparc/prom/console_32.c
index b05e3db..055368a 100644
--- a/arch/sparc/prom/console_32.c
+++ b/arch/sparc/prom/console_32.c
@@ -50,8 +50,7 @@ void prom_console_write_buf(const char *buf, int len)
 		int n = prom_nbputchar(buf);
 		if (n < 0)
 			continue;
-		len--;
-		buf++;
+		len -= n;
+		buf += n;
 	}
 }
-
--
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