Commit be33f56c authored by Peter Maydell's avatar Peter Maydell
Browse files

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: default avatarPeter Maydell <peter.maydell@linaro.org>
parents e4a9a730 0d1e8d6f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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. */
+0 −1
Original line number Diff line number Diff line
@@ -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)
+0 −16
Original line number Diff line number Diff line
@@ -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;
}

+0 −2
Original line number Diff line number Diff line
@@ -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)