mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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:
parent
31d0f80f17
commit
a15bb0d6a9
3 changed files with 32 additions and 20 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue