aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/hvc/hvc_dcc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/tty/hvc/hvc_dcc.c b/drivers/tty/hvc/hvc_dcc.c
index 155ec105e1c8..ad23cc8082a0 100644
--- a/drivers/tty/hvc/hvc_dcc.c
+++ b/drivers/tty/hvc/hvc_dcc.c
@@ -89,7 +89,7 @@ static int hvc_dcc_put_chars(uint32_t vt, const char *buf, int count)
89 while (__dcc_getstatus() & DCC_STATUS_TX) 89 while (__dcc_getstatus() & DCC_STATUS_TX)
90 cpu_relax(); 90 cpu_relax();
91 91
92 __dcc_putchar((char)(buf[i] & 0xFF)); 92 __dcc_putchar(buf[i]);
93 } 93 }
94 94
95 return count; 95 return count;
@@ -99,15 +99,11 @@ static int hvc_dcc_get_chars(uint32_t vt, char *buf, int count)
99{ 99{
100 int i; 100 int i;
101 101
102 for (i = 0; i < count; ++i) { 102 for (i = 0; i < count; ++i)
103 int c = -1;
104
105 if (__dcc_getstatus() & DCC_STATUS_RX) 103 if (__dcc_getstatus() & DCC_STATUS_RX)
106 c = __dcc_getchar(); 104 buf[i] = __dcc_getchar();
107 if (c < 0) 105 else
108 break; 106 break;
109 buf[i] = c;
110 }
111 107
112 return i; 108 return i;
113} 109}