aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/ccid-card-passthru.c2
-rw-r--r--hw/usb/redirect.c2
-rw-r--r--hw/usb/xen-usb.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index daab0d56cf..a41b0d6ec5 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -267,7 +267,7 @@ static void ccid_card_vscard_drop_connection(PassthruState *card)
Chardev *chr = qemu_chr_fe_get_driver(&card->cs);
qemu_chr_fe_deinit(&card->cs);
- qemu_chr_delete(chr);
+ object_unparent(OBJECT(chr));
card->vscard_in_pos = card->vscard_in_hdr = 0;
}
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 0efe62f725..b001a27f05 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1433,7 +1433,7 @@ static void usbredir_unrealize(USBDevice *udev, Error **errp)
Chardev *chr = qemu_chr_fe_get_driver(&dev->cs);
qemu_chr_fe_deinit(&dev->cs);
- qemu_chr_delete(chr);
+ object_unparent(OBJECT(chr));
/* Note must be done after qemu_chr_close, as that causes a close event */
qemu_bh_delete(dev->chardev_close_bh);
diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c
index 370b3d9387..fe62183fe3 100644
--- a/hw/usb/xen-usb.c
+++ b/hw/usb/xen-usb.c
@@ -746,16 +746,16 @@ static void usbback_portid_add(struct usbback_info *usbif, unsigned port,
portname++;
qdict = qdict_new();
- qdict_put(qdict, "driver", qstring_from_str("usb-host"));
+ qdict_put_str(qdict, "driver", "usb-host");
tmp = g_strdup_printf("%s.0", usbif->xendev.qdev.id);
- qdict_put(qdict, "bus", qstring_from_str(tmp));
+ qdict_put_str(qdict, "bus", tmp);
g_free(tmp);
tmp = g_strdup_printf("%s-%u", usbif->xendev.qdev.id, port);
- qdict_put(qdict, "id", qstring_from_str(tmp));
+ qdict_put_str(qdict, "id", tmp);
g_free(tmp);
- qdict_put(qdict, "port", qint_from_int(port));
- qdict_put(qdict, "hostbus", qint_from_int(atoi(busid)));
- qdict_put(qdict, "hostport", qstring_from_str(portname));
+ qdict_put_int(qdict, "port", port);
+ qdict_put_int(qdict, "hostbus", atoi(busid));
+ qdict_put_str(qdict, "hostport", portname);
opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict, &local_err);
if (local_err) {
goto err;