diff options
author | Amit Shah <amit.shah@redhat.com> | 2012-01-13 15:29:48 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-13 10:21:03 -0600 |
commit | a10348c3ad3a1bff7c5ace95a32187780d571ebd (patch) | |
tree | 4cb2170cdbf7c7f0436af662b5f44677bd287178 | |
parent | a87f3e8b080205879232f34ff6977cb225b70e05 (diff) | |
download | qemu-a10348c3ad3a1bff7c5ace95a32187780d571ebd.zip |
virtio-console: no need to remove char handlers explicitly
qdev is now equipped (thanks to the last commit) to disassociate
chardevs from the qdev devices on the devices going away. So doing it
in the virtio-console driver is not necessary.
Since that was the only thing being done in the qdev exit method, drop
it entirely.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/virtio-console.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 73d866a52d..0b28a30b8c 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -125,27 +125,11 @@ static int virtconsole_initfn(VirtIOSerialPort *port) return 0; } -static int virtconsole_exitfn(VirtIOSerialPort *port) -{ - VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port); - - if (vcon->chr) { - /* - * Instead of closing the chardev, free it so it can be used - * for other purposes. - */ - qemu_chr_add_handlers(vcon->chr, NULL, NULL, NULL, NULL); - } - - return 0; -} - static VirtIOSerialPortInfo virtconsole_info = { .qdev.name = "virtconsole", .qdev.size = sizeof(VirtConsole), .is_console = true, .init = virtconsole_initfn, - .exit = virtconsole_exitfn, .have_data = flush_buf, .guest_open = guest_open, .guest_close = guest_close, @@ -165,7 +149,6 @@ static VirtIOSerialPortInfo virtserialport_info = { .qdev.name = "virtserialport", .qdev.size = sizeof(VirtConsole), .init = virtconsole_initfn, - .exit = virtconsole_exitfn, .have_data = flush_buf, .guest_open = guest_open, .guest_close = guest_close, |