Commit 88de0be0 authored by Milton Miller's avatar Milton Miller Committed by Linus Torvalds
Browse files

[PATCH] hvc_console: Use hvc_get_chars in hvsi code



Now that hvc_get_chars doesn't strip NULs, hvsi doesn't have to duplicate it.

Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 70b234a4
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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)
	got = hvc_get_chars(hp->vtermno, buf, count);

	return got;
	return 0;
}

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