Patchwork [v3,5/9] usb-serial: don't magically zap chardev on umplug

login
register
mail settings
Submitter Gerd Hoffmann
Date Oct. 15, 2012, 8:06 a.m.
Message ID <1350288417-24350-6-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/191495/
State New
Headers show

Comments

Gerd Hoffmann - Oct. 15, 2012, 8:06 a.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/dev-serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 69b6e48..43214cd 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -421,7 +421,7 @@  static void usb_serial_handle_destroy(USBDevice *dev)
 {
     USBSerialState *s = (USBSerialState *)dev;
 
-    qemu_chr_delete(s->cs);
+    qemu_chr_add_handlers(s->cs, NULL, NULL, NULL, NULL);
 }
 
 static int usb_serial_can_read(void *opaque)