aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/ccid-card-emulated.c2
-rw-r--r--hw/usb/ccid-card-passthru.c7
-rw-r--r--hw/usb/dev-serial.c3
-rw-r--r--hw/usb/redirect.c6
4 files changed, 7 insertions, 11 deletions
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 9962786..e646eb2 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -33,7 +33,7 @@
#include <vcard_emul.h>
#include "qemu/thread.h"
-#include "sysemu/char.h"
+#include "qemu/main-loop.h"
#include "ccid.h"
#define DPRINTF(card, lvl, fmt, ...) \
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index a41b0d6..ac1725e 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -9,7 +9,7 @@
*/
#include "qemu/osdep.h"
-#include "sysemu/char.h"
+#include "chardev/char-fe.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "ccid.h"
@@ -264,10 +264,7 @@ static void ccid_card_vscard_handle_message(PassthruState *card,
static void ccid_card_vscard_drop_connection(PassthruState *card)
{
- Chardev *chr = qemu_chr_fe_get_driver(&card->cs);
-
- qemu_chr_fe_deinit(&card->cs);
- object_unparent(OBJECT(chr));
+ qemu_chr_fe_deinit(&card->cs, true);
card->vscard_in_pos = card->vscard_in_hdr = 0;
}
diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 76ceca1..bfbf7cd 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -15,7 +15,8 @@
#include "qemu/error-report.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
-#include "sysemu/char.h"
+#include "chardev/char-serial.h"
+#include "chardev/char-fe.h"
//#define DEBUG_Serial
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index ad5ef78..aa22d69 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -33,7 +33,7 @@
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/iov.h"
-#include "sysemu/char.h"
+#include "chardev/char-fe.h"
#include <usbredirparser.h>
#include <usbredirfilter.h>
@@ -1419,10 +1419,8 @@ static void usbredir_cleanup_device_queues(USBRedirDevice *dev)
static void usbredir_unrealize(USBDevice *udev, Error **errp)
{
USBRedirDevice *dev = USB_REDIRECT(udev);
- Chardev *chr = qemu_chr_fe_get_driver(&dev->cs);
- qemu_chr_fe_deinit(&dev->cs);
- object_unparent(OBJECT(chr));
+ qemu_chr_fe_deinit(&dev->cs, true);
/* Note must be done after qemu_chr_close, as that causes a close event */
qemu_bh_delete(dev->chardev_close_bh);