usb core: use qdev for -usbdevice
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 26 Oct 2009 14:56:45 +0000 (15:56 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 30 Oct 2009 13:39:30 +0000 (08:39 -0500)
commitce024b86e1d094e52103042fd5a77dd780f70806
tree377a8fb798d1607f0c90d852b31465fd4db1f13e
parent7eb4ade31d8594f3a29652183343c3bf50387d27
usb core: use qdev for -usbdevice

This patchs adds infrastructure to handle -usbdevice via qdev callbacks.
USBDeviceInfo gets a name field (for the -usbdevice driver name) and a
callback for -usbdevice parameter parsing.

The new usbdevice_create() function walks the qdev driver list and looks
for a usb driver with a matching name.  When a parameter parsing
callback is present it is called, otherwise the device is created via
usb_create_simple().

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.c
hw/qdev.h
hw/usb-bus.c
hw/usb.h
vl.c