qdev/usb: add usb bus support to qdev, convert drivers.

* Add USBBus.
 * Add USBDeviceInfo, move device callbacks here.
 * Add usb-qdev helper functions.
 * Switch drivers to qdev.

TODO:
 * make the rest of qemu aware of usb busses and kill the FIXMEs
   added by this patch.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Gerd Hoffmann 2009-08-31 14:23:59 +02:00 committed by Anthony Liguori
parent 7557008854
commit 806b602482
17 changed files with 428 additions and 197 deletions

View file

@ -590,7 +590,7 @@ static inline void musb_packet(MUSBState *s, MUSBEndPoint *ep,
ep->packey[dir].complete_opaque = ep;
if (s->port.dev)
ret = s->port.dev->handle_packet(s->port.dev, &ep->packey[dir]);
ret = s->port.dev->info->handle_packet(s->port.dev, &ep->packey[dir]);
else
ret = USB_RET_NODEV;