aboutsummaryrefslogtreecommitdiff
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-09-26 09:28:22 +0000
committerAndreas Färber <afaerber@suse.de>2014-10-15 05:03:13 +0200
commit431bbb26cbd0e9862c48320deaaf83aa9aacd6ce (patch)
tree8e8aa8f8daa023deb8b85fbf70010cd709640a0d /include/hw/qdev-core.h
parent014176f914ab8e41a88225e8f26569ef0e0bf223 (diff)
qdev: Add wrapper to set BUS as HotplugHandler
To be used for conversion of SCSI and USB devices, and would allow to make every HBA/USB host switch to HotplugHandler API without touching each controller explicitly. 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 'include/hw/qdev-core.h')
-rw-r--r--include/hw/qdev-core.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index ba812c5f9e..48e9579a88 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -363,13 +363,10 @@ extern int qdev_hotplug;
char *qdev_get_dev_path(DeviceState *dev);
-static inline void qbus_set_hotplug_handler(BusState *bus, DeviceState *handler,
- Error **errp)
-{
- 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);
+
+void qbus_set_bus_hotplug_handler(BusState *bus, Error **errp);
static inline bool qbus_is_hotpluggable(BusState *bus)
{