aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:32:16 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:05:28 +0200
commit590ce74a08d5b4fb39ac165a4fb68bd07e6d2b6c (patch)
tree22d63bcd8ac233c82139e9dd4f5ddee83f962ac3 /include/hw
parent32aaaebe5665a75f8be8d76ba3ecfcf87627858b (diff)
downloadqemu-590ce74a08d5b4fb39ac165a4fb68bd07e6d2b6c.zip
qemu-590ce74a08d5b4fb39ac165a4fb68bd07e6d2b6c.tar.gz
qemu-590ce74a08d5b4fb39ac165a4fb68bd07e6d2b6c.tar.bz2
usb: Convert uses of usb_create()
Replace dev = usb_create(bus, type_name); ... object_property_set_bool(OBJECT(dev), true, "realized", &err); by dev = isa_new(type_name); ... usb_realize_and_unref(dev, bus, &err); Recent commit "qdev: New qdev_new(), qdev_realize(), etc." explains why. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-28-armbru@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/usb.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/hw/usb.h b/include/hw/usb.h
index 1cc0ba0..dce16c7 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -502,8 +502,7 @@ void usb_bus_new(USBBus *bus, size_t bus_size,
void usb_bus_release(USBBus *bus);
USBBus *usb_bus_find(int busnr);
void usb_legacy_register(const char *typename, const char *usbdevice_name,
- USBDevice *(*usbdevice_init)(USBBus *bus,
- const char *params));
+ USBDevice *(*usbdevice_init)(const char *params));
USBDevice *usb_new(const char *name);
bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp);
USBDevice *usb_create(USBBus *bus, const char *name);