summary refs log tree commit diff stats
path: root/hw/virtio-console.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-05-25 14:21:13 +0200
committerAmit Shah <amit.shah@redhat.com>2011-05-27 15:50:56 +0530
commita15bb0d6a981de749452a5180fc8084d625671da (patch)
treec595ac2c921f384d72089610c35fcc1e2e39e79f /hw/virtio-console.c
parent31d0f80f17b37a71ad4231daf05be9fab3c70292 (diff)
downloadfocaccia-qemu-a15bb0d6a981de749452a5180fc8084d625671da.tar.gz
focaccia-qemu-a15bb0d6a981de749452a5180fc8084d625671da.zip
virtio-serial: Drop redundant VirtIOSerialPort member info
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'hw/virtio-console.c')
-rw-r--r--hw/virtio-console.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/virtio-console.c b/hw/virtio-console.c
index 180ac0af76..713f6ef390 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;
 }