aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/ccid-card-passthru.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/ccid-card-passthru.c')
-rw-r--r--hw/usb/ccid-card-passthru.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index a41b0d6ec5..ac1725eeae 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;
}