usb: add usb_handle_packet

Add a usb_handle_packet function, put it into use everywhere.
Right now it just calls dev->info->handle_packet(), that will
change in future patches though.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2011-05-12 13:20:39 +02:00
parent ebd669a19f
commit 53aa8c0e2a
6 changed files with 22 additions and 7 deletions

View file

@ -495,7 +495,7 @@ static int usb_hub_broadcast_packet(USBHubState *s, USBPacket *p)
port = &s->ports[i];
dev = port->port.dev;
if (dev && (port->wPortStatus & PORT_STAT_ENABLE)) {
ret = dev->info->handle_packet(dev, p);
ret = usb_handle_packet(dev, p);
if (ret != USB_RET_NODEV) {
return ret;
}