From 013569361447064adb05c7433baff983d440d9ee Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 3 Feb 2011 15:48:35 -0800 Subject: [PATCH] --- yaml --- r: 235516 b: refs/heads/master c: bf73bd35a296b31dace098b9104b6b593ee0070f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/tty/hvc/hvc_dcc.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index ae242d730ac7..4729b3bb704c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a99632014631409483a481a6a0d77d09ded47239 +refs/heads/master: bf73bd35a296b31dace098b9104b6b593ee0070f diff --git a/trunk/drivers/tty/hvc/hvc_dcc.c b/trunk/drivers/tty/hvc/hvc_dcc.c index 155ec105e1c8..ad23cc8082a0 100644 --- a/trunk/drivers/tty/hvc/hvc_dcc.c +++ b/trunk/drivers/tty/hvc/hvc_dcc.c @@ -89,7 +89,7 @@ static int hvc_dcc_put_chars(uint32_t vt, const char *buf, int count) while (__dcc_getstatus() & DCC_STATUS_TX) cpu_relax(); - __dcc_putchar((char)(buf[i] & 0xFF)); + __dcc_putchar(buf[i]); } return count; @@ -99,15 +99,11 @@ static int hvc_dcc_get_chars(uint32_t vt, char *buf, int count) { int i; - for (i = 0; i < count; ++i) { - int c = -1; - + for (i = 0; i < count; ++i) if (__dcc_getstatus() & DCC_STATUS_RX) - c = __dcc_getchar(); - if (c < 0) + buf[i] = __dcc_getchar(); + else break; - buf[i] = c; - } return i; }