diff options
author | Anton Blanchard <anton@samba.org> | 2013-08-07 02:01:23 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-14 11:50:23 +1000 |
commit | a0a96ee9ba9ea188dee9126dbb404ff6253318cd (patch) | |
tree | 88183d79128d13443ba872be6575adab254348ca /arch/powerpc/platforms/pseries/hvconsole.c | |
parent | 01b0e07e603b1f2c589f841cf73eb80a4a06cde4 (diff) | |
download | talos-op-linux-a0a96ee9ba9ea188dee9126dbb404ff6253318cd.tar.gz talos-op-linux-a0a96ee9ba9ea188dee9126dbb404ff6253318cd.zip |
powerpc/pseries: Simplify H_GET_TERM_CHAR
plpar_get_term_char is only used once and just adds a layer
of complexity to H_GET_TERM_CHAR. plpar_put_term_char isn't
used at all so we can remove it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/hvconsole.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/hvconsole.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/hvconsole.c b/arch/powerpc/platforms/pseries/hvconsole.c index b344f94b0400..aa0aa37a4fd0 100644 --- a/arch/powerpc/platforms/pseries/hvconsole.c +++ b/arch/powerpc/platforms/pseries/hvconsole.c @@ -40,10 +40,16 @@ */ int hvc_get_chars(uint32_t vtermno, char *buf, int count) { - unsigned long got; + long ret; + unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; + unsigned long *lbuf = (unsigned long *)buf; + + ret = plpar_hcall(H_GET_TERM_CHAR, retbuf, vtermno); + lbuf[0] = retbuf[1]; + lbuf[1] = retbuf[2]; - if (plpar_get_term_char(vtermno, &got, buf) == H_SUCCESS) - return got; + if (ret == H_SUCCESS) + return retbuf[0]; return 0; } |