From: Gerd Hoffmann Date: Wed, 15 Dec 2010 10:47:19 +0000 (+0100) Subject: ohci: get ohci state via container_of() X-Git-Tag: v0.15.0-rc0~301^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9066df13a3db0b8c4c283fb6c6772da3d507c9b7;p=qemu-xen-4.2-testing.git ohci: get ohci state via container_of() Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 0ad4f555d..7678cdba1 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -577,7 +577,7 @@ static void ohci_process_lists(OHCIState *ohci, int completion); static void ohci_async_complete_packet(USBPacket *packet, void *opaque) { - OHCIState *ohci = opaque; + OHCIState *ohci = container_of(packet, OHCIState, usb_packet); #ifdef DEBUG_PACKET DPRINTF("Async packet complete\n"); #endif