aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-bus.c
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
commitef816d831f474aa3f9b804bebbdfd860dfe585dd (patch)
tree6ef8ded9b615c5807ae255a676828a338d65fa2d /hw/usb-bus.c
parent3418bd25e1763ecb29c912775e2639f30a4f9016 (diff)
downloadqemu-ef816d831f474aa3f9b804bebbdfd860dfe585dd.zip
qemu-ef816d831f474aa3f9b804bebbdfd860dfe585dd.tar.gz
qemu-ef816d831f474aa3f9b804bebbdfd860dfe585dd.tar.bz2
usb: hotplug windup
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/usb-bus.c')
-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 d0b59dd..0c63279 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);
}