From c27f813900a3c114562efbb8df1065e94766fc48 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 10 Feb 2009 15:43:59 -0800 Subject: auto import from //branches/cupcake/...@130745 --- hw/goldfish_tty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'hw/goldfish_tty.c') diff --git a/hw/goldfish_tty.c b/hw/goldfish_tty.c index d61712a..aa62d75 100644 --- a/hw/goldfish_tty.c +++ b/hw/goldfish_tty.c @@ -9,7 +9,8 @@ ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. */ -#include "vl.h" +#include "qemu_file.h" +#include "qemu-char.h" #include "goldfish_device.h" enum { @@ -165,14 +166,14 @@ static void goldfish_tty_write(void *opaque, target_phys_addr_t offset, uint32_t } } -static int tty_can_recieve(void *opaque) +static int tty_can_receive(void *opaque) { struct tty_state *s = opaque; return (sizeof(s->data) - s->data_count); } -static void tty_recieve(void *opaque, const uint8_t *buf, int size) +static void tty_receive(void *opaque, const uint8_t *buf, int size) { struct tty_state *s = opaque; @@ -210,7 +211,7 @@ int goldfish_tty_add(CharDriverState *cs, int id, uint32_t base, int irq) s->cs = cs; if(cs) { - qemu_chr_add_read_handler(cs, tty_can_recieve, tty_recieve, s); + qemu_chr_add_handlers(cs, tty_can_receive, tty_receive, NULL, s); } ret = goldfish_device_add(&s->dev, goldfish_tty_readfn, goldfish_tty_writefn, s); -- cgit v1.1