virtio-serial: Drop redundant VirtIOSerialPort member info

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
This commit is contained in:
Markus Armbruster 2011-05-25 14:21:13 +02:00 committed by Amit Shah
parent 31d0f80f17
commit a15bb0d6a9
3 changed files with 32 additions and 20 deletions

View file

@ -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;
}