diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-09-26 09:28:40 +0000 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-10-15 05:03:14 +0200 |
commit | 2d9a982f37cc7c427d655a828c5ffa3cc5753863 (patch) | |
tree | 97203426ab07e6149d226e8c7b1578fe96a85d38 /hw | |
parent | 5f4d917376fef99fe7f2e978b404cddc41727fa4 (diff) | |
download | qemu-2d9a982f37cc7c427d655a828c5ffa3cc5753863.zip qemu-2d9a982f37cc7c427d655a828c5ffa3cc5753863.tar.gz qemu-2d9a982f37cc7c427d655a828c5ffa3cc5753863.tar.bz2 |
qdev: Drop legacy hotplug fields/methods
It removes not needed anymore BusState::allow_hotplug field and
DeviceClass::unplug callback.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/qdev.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 6439a23..3e58dd0 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -114,7 +114,6 @@ static void qbus_set_hotplug_handler_internal(BusState *bus, Object *handler, object_property_set_link(OBJECT(bus), OBJECT(handler), QDEV_HOTPLUG_HANDLER_PROPERTY, errp); - bus->allow_hotplug = 1; } void qbus_set_hotplug_handler(BusState *bus, DeviceState *handler, Error **errp) @@ -254,10 +253,7 @@ void qdev_unplug(DeviceState *dev, Error **errp) hotplug_handler_unplug(dev->parent_bus->hotplug_handler, dev, errp); } } else { - assert(dc->unplug != NULL); - if (dc->unplug(dev) < 0) { /* legacy handler */ - error_set(errp, QERR_UNDEFINED_ERROR); - } + assert(0); } } @@ -294,17 +290,11 @@ void qbus_reset_all_fn(void *opaque) } /* can be used as ->unplug() callback for the simple cases */ -int qdev_simple_unplug_cb(DeviceState *dev) -{ - /* just zap it */ - object_unparent(OBJECT(dev)); - return 0; -} - void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - qdev_simple_unplug_cb(dev); + /* just zap it */ + object_unparent(OBJECT(dev)); } /* Like qdev_init(), but terminate program via error_report() instead of |