aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-uhci.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-12-16 17:03:44 +0100
committerGerd Hoffmann <kraxel@redhat.com>2011-05-04 14:11:08 +0200
commit13a9a0d3e253e272744b523e39642c9b6d564f4d (patch)
treef8591c4f360bd40a98fc756195920181cac71ec4 /hw/usb-uhci.c
parent5dc1672b279344b5e4e1ba5526a8e45466b953a8 (diff)
usb: move complete callback to port ops
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r--hw/usb-uhci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 2b63b3f9e0..a65e0b3af6 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -642,7 +642,7 @@ static int uhci_broadcast_packet(UHCIState *s, USBPacket *p)
return ret;
}
-static void uhci_async_complete(USBPacket * packet, void *opaque);
+static void uhci_async_complete(USBDevice *dev, USBPacket *packet);
static void uhci_process_frame(UHCIState *s);
/* return -1 if fatal error (frame must be stopped)
@@ -795,8 +795,6 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *in
async->packet.devep = (td->token >> 15) & 0xf;
async->packet.data = async->buffer;
async->packet.len = max_len;
- async->packet.complete_cb = uhci_async_complete;
- async->packet.complete_opaque = s;
switch(pid) {
case USB_TOKEN_OUT:
@@ -832,7 +830,7 @@ done:
return len;
}
-static void uhci_async_complete(USBPacket *packet, void *opaque)
+static void uhci_async_complete(USBDevice *dev, USBPacket *packet)
{
UHCIAsync *async = container_of(packet, UHCIAsync, packet);
UHCIState *s = async->uhci;
@@ -1083,6 +1081,7 @@ static USBPortOps uhci_port_ops = {
.attach = uhci_attach,
.detach = uhci_detach,
.wakeup = uhci_wakeup,
+ .complete = uhci_async_complete,
};
static int usb_uhci_common_initfn(UHCIState *s)