From a15bb0d6a981de749452a5180fc8084d625671da Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 25 May 2011 14:21:13 +0200 Subject: virtio-serial: Drop redundant VirtIOSerialPort member info Signed-off-by: Markus Armbruster Signed-off-by: Amit Shah --- hw/virtio-console.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hw/virtio-console.c') diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 180ac0a..713f6ef 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -76,12 +76,15 @@ static void chr_event(void *opaque, int event) static int generic_port_init(VirtConsole *vcon, VirtIOSerialPort *port) { + VirtIOSerialPortInfo *info = DO_UPCAST(VirtIOSerialPortInfo, qdev, + vcon->port.dev.info); + if (vcon->chr) { qemu_chr_add_handlers(vcon->chr, chr_can_read, chr_read, chr_event, vcon); - vcon->port.info->have_data = flush_buf; - vcon->port.info->guest_open = guest_open; - vcon->port.info->guest_close = guest_close; + info->have_data = flush_buf; + info->guest_open = guest_open; + info->guest_close = guest_close; } return 0; } -- cgit v1.1