diff options
author | Peter Maydell | 2018-06-19 13:58:06 +0200 |
---|---|---|
committer | Peter Maydell | 2018-06-19 13:58:06 +0200 |
commit | be33f56c76e5d54d780b402f7777c92103e32419 (patch) | |
tree | 25e06c65431552a5dbeba4ff237f48ea66c645d4 /hw | |
parent | Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180618' into... (diff) | |
parent | Revert "bus: do not unref the added child bus on realize" (diff) | |
download | qemu-be33f56c76e5d54d780b402f7777c92103e32419.tar.gz qemu-be33f56c76e5d54d780b402f7777c92103e32419.tar.xz qemu-be33f56c76e5d54d780b402f7777c92103e32419.zip |
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180618-pull-request' into staging
usb: revert ccid / qom patches.
# gpg: Signature made Mon 18 Jun 2018 10:21:11 BST
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/usb-20180618-pull-request:
Revert "bus: do not unref the added child bus on realize"
Revert "usb: release the created buses"
Revert "usb-ccid: fix bus leak"
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/bus.c | 1 | ||||
-rw-r--r-- | hw/usb/dev-smartcard-reader.c | 1 | ||||
-rw-r--r-- | hw/usb/dev-storage.c | 16 | ||||
-rw-r--r-- | hw/usb/dev-uas.c | 2 |
4 files changed, 1 insertions, 19 deletions
diff --git a/hw/core/bus.c b/hw/core/bus.c index ad0c9df335..4651f24486 100644 --- a/hw/core/bus.c +++ b/hw/core/bus.c @@ -102,6 +102,7 @@ static void qbus_realize(BusState *bus, DeviceState *parent, const char *name) QLIST_INSERT_HEAD(&bus->parent->child_bus, bus, sibling); bus->parent->num_child_bus++; object_property_add_child(OBJECT(bus->parent), bus->name, OBJECT(bus), NULL); + object_unref(OBJECT(bus)); } else if (bus != sysbus_get_default()) { /* TODO: once all bus devices are qdevified, only reset handler for main_system_bus should be registered here. */ diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index fa546fb3ce..13d0befd9c 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -1147,7 +1147,6 @@ static void ccid_unrealize(USBDevice *dev, Error **errp) USBCCIDState *s = USB_CCID_DEV(dev); ccid_bulk_in_clear(s); - object_unref(OBJECT(&s->bus)); } static void ccid_flush_pending_answers(USBCCIDState *s) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 47b992f403..c99398b7f6 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -588,13 +588,6 @@ static const struct SCSIBusInfo usb_msd_scsi_info_bot = { .load_request = usb_msd_load_request, }; -static void usb_msd_unrealize_storage(USBDevice *dev, Error **errp) -{ - MSDState *s = USB_STORAGE_DEV(dev); - - object_unref(OBJECT(&s->bus)); -} - static void usb_msd_storage_realize(USBDevice *dev, Error **errp) { MSDState *s = USB_STORAGE_DEV(dev); @@ -642,13 +635,6 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp) s->scsi_dev = scsi_dev; } -static void usb_msd_bot_unrealize(USBDevice *dev, Error **errp) -{ - MSDState *s = USB_STORAGE_DEV(dev); - - object_unref(OBJECT(&s->bus)); -} - static void usb_msd_bot_realize(USBDevice *dev, Error **errp) { MSDState *s = USB_STORAGE_DEV(dev); @@ -712,7 +698,6 @@ static void usb_msd_class_storage_initfn(ObjectClass *klass, void *data) USBDeviceClass *uc = USB_DEVICE_CLASS(klass); uc->realize = usb_msd_storage_realize; - uc->unrealize = usb_msd_unrealize_storage; dc->props = msd_properties; } @@ -775,7 +760,6 @@ static void usb_msd_class_bot_initfn(ObjectClass *klass, void *data) USBDeviceClass *uc = USB_DEVICE_CLASS(klass); uc->realize = usb_msd_bot_realize; - uc->unrealize = usb_msd_bot_unrealize; uc->attached_settable = true; } diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index aaf5a88095..be566cad02 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -896,8 +896,6 @@ static void usb_uas_unrealize(USBDevice *dev, Error **errp) UASDevice *uas = USB_UAS(dev); qemu_bh_delete(uas->status_bh); - - object_unref(OBJECT(&uas->bus)); } static void usb_uas_realize(USBDevice *dev, Error **errp) |