aboutsummaryrefslogtreecommitdiffstats
path: root/hw/goldfish_tty.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
commitc27f813900a3c114562efbb8df1065e94766fc48 (patch)
treed95919283707dcab61009e27007374a745c9541e /hw/goldfish_tty.c
parent0852ad57fa372f9b2854e4df685eaba8d8ef6790 (diff)
downloadexternal_qemu-c27f813900a3c114562efbb8df1065e94766fc48.zip
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.gz
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'hw/goldfish_tty.c')
-rw-r--r--hw/goldfish_tty.c9
1 files changed, 5 insertions, 4 deletions
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);