Skip to content

Commit

Permalink
[PATCH] hvc_console: Use hvc_get_chars in hvsi code
Browse files Browse the repository at this point in the history
Now that hvc_get_chars doesn't strip NULs, hvsi doesn't have to duplicate it.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Milton Miller authored and Linus Torvalds committed Jul 8, 2005
1 parent 70b234a commit 88de0be
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/char/hvsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,13 @@ static void dump_packet(uint8_t *packet)
dump_hex(packet, header->len);
}

/* can't use hvc_get_chars because that strips CRs */
static int hvsi_read(struct hvsi_struct *hp, char *buf, int count)
{
unsigned long got;

if (plpar_hcall(H_GET_TERM_CHAR, hp->vtermno, 0, 0, 0, &got,
(unsigned long *)buf, (unsigned long *)buf+1) == H_Success)
return got;
return 0;
got = hvc_get_chars(hp->vtermno, buf, count);

return got;
}

static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet,
Expand Down

0 comments on commit 88de0be

Please sign in to comment.