aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/kernel')
-rw-r--r--arch/ppc64/kernel/hvconsole.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/ppc64/kernel/hvconsole.c b/arch/ppc64/kernel/hvconsole.c
index 9d8876d92eb9..138e128a3886 100644
--- a/arch/ppc64/kernel/hvconsole.c
+++ b/arch/ppc64/kernel/hvconsole.c
@@ -41,29 +41,14 @@ int hvc_get_chars(uint32_t vtermno, char *buf, int count)
41 unsigned long got; 41 unsigned long got;
42 42
43 if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got, 43 if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got,
44 (unsigned long *)buf, (unsigned long *)buf+1) == H_Success) { 44 (unsigned long *)buf, (unsigned long *)buf+1) == H_Success)
45 /*
46 * Work around a HV bug where it gives us a null
47 * after every \r. -- paulus
48 */
49 if (got > 0) {
50 int i;
51 for (i = 1; i < got; ++i) {
52 if (buf[i] == 0 && buf[i-1] == '\r') {
53 --got;
54 if (i < got)
55 memmove(&buf[i], &buf[i+1],
56 got - i);
57 }
58 }
59 }
60 return got; 45 return got;
61 }
62 return 0; 46 return 0;
63} 47}
64 48
65EXPORT_SYMBOL(hvc_get_chars); 49EXPORT_SYMBOL(hvc_get_chars);
66 50
51
67/** 52/**
68 * hvc_put_chars: send characters to firmware for denoted vterm adapter 53 * hvc_put_chars: send characters to firmware for denoted vterm adapter
69 * @vtermno: The vtermno or unit_address of the adapter from which the data 54 * @vtermno: The vtermno or unit_address of the adapter from which the data