summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-25 21:42:42 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:48 -0500
commit054c7605f3767c6ab48778fd4fb12bcc2714c9e2 (patch)
tree6ef8ded9b615c5807ae255a676828a338d65fa2d /hw
parent43780b59176a21b1d21f637757f55a961b375420 (diff)
downloadqemu-054c7605f3767c6ab48778fd4fb12bcc2714c9e2.tar.gz
qemu-054c7605f3767c6ab48778fd4fb12bcc2714c9e2.tar.bz2
qemu-054c7605f3767c6ab48778fd4fb12bcc2714c9e2.zip
usb: hotplug windup
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb-bus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index d0b59dd4dd..0c63279350 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -18,6 +18,7 @@ void usb_bus_new(USBBus *bus, DeviceState *host)
{
qbus_create_inplace(&bus->qbus, &usb_bus_info, host, NULL);
bus->busnr = next_usb_bus++;
+ bus->qbus.allow_hotplug = 1; /* Yes, we can */
QTAILQ_INIT(&bus->free);
QTAILQ_INIT(&bus->used);
QTAILQ_INSERT_TAIL(&busses, bus, next);
@@ -65,6 +66,7 @@ void usb_qdev_register(USBDeviceInfo *info)
{
info->qdev.bus_info = &usb_bus_info;
info->qdev.init = usb_qdev_init;
+ info->qdev.unplug = qdev_simple_unplug_cb;
info->qdev.exit = usb_qdev_exit;
qdev_register(&info->qdev);
}