diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-15 17:25:25 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-15 17:25:25 -0600 |
commit | 7718564ba1295f35188a5fb3ac8633c29d43b166 (patch) | |
tree | 5aa858b930de7f4c25867f05f867c049d4f713f5 /hw/usb-bus.c | |
parent | 65b31cc207b8ab949033870acf55bb124d12848e (diff) | |
parent | 7c605a23b2c7606f5f06b7d83d8927b1dc111478 (diff) |
Merge remote-tracking branch 'kraxel/usb.38' into staging
* kraxel/usb.38: (28 commits)
xhci: handle USB_RET_NAK
xhci: remote wakeup support
xhci: kill port arg from xhci_setup_packet
xhci: stop on errors
xhci: add trb type name lookup support.
xhci: signal low- and fullspeed support
usb: add USBBusOps->wakeup_endpoint
usb: pass USBEndpoint to usb_wakeup
usb: maintain async packet list per endpoint
usb: Set USBEndpoint in usb_packet_setup().
usb: add USBEndpoint->{nr,pid}
usb: USBPacket: add status, rename owner -> ep
usb: fold usb_generic_handle_packet into usb_handle_packet
usb: kill handle_packet callback
usb-xhci: switch to usb_find_device()
usb-musb: switch to usb_find_device()
usb-ohci: switch to usb_find_device()
usb-ehci: switch to usb_find_device()
usb-uhci: switch to usb_find_device()
usb: handle dev == NULL in usb_handle_packet()
...
Diffstat (limited to 'hw/usb-bus.c')
-rw-r--r-- | hw/usb-bus.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/usb-bus.c b/hw/usb-bus.c index e97fb6af3c..ae79a4527b 100644 --- a/hw/usb-bus.c +++ b/hw/usb-bus.c @@ -74,21 +74,21 @@ static int usb_device_init(USBDevice *dev) return 0; } -static void usb_device_handle_destroy(USBDevice *dev) +USBDevice *usb_device_find_device(USBDevice *dev, uint8_t addr) { USBDeviceClass *klass = USB_DEVICE_GET_CLASS(dev); - if (klass->handle_destroy) { - klass->handle_destroy(dev); + if (klass->find_device) { + return klass->find_device(dev, addr); } + return NULL; } -int usb_device_handle_packet(USBDevice *dev, USBPacket *p) +static void usb_device_handle_destroy(USBDevice *dev) { USBDeviceClass *klass = USB_DEVICE_GET_CLASS(dev); - if (klass->handle_packet) { - return klass->handle_packet(dev, p); + if (klass->handle_destroy) { + klass->handle_destroy(dev); } - return -ENOSYS; } void usb_device_cancel_packet(USBDevice *dev, USBPacket *p) |