From d47e59b8b8adc96a2052f7e004cb12b6ff62edd9 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 21 Jun 2011 11:52:28 +0200 Subject: usb: Make port wakeup and complete ops take a USBPort instead of a Device This makes them consistent with the attach and detach ops, and in general it makes sense to make portops take a port as argument. This also makes adding support for a companion controller easier / cleaner. [ kraxel: fix usb-musb.c build ] Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb-musb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/usb-musb.c') diff --git a/hw/usb-musb.c b/hw/usb-musb.c index 84e601762c..580bdc815a 100644 --- a/hw/usb-musb.c +++ b/hw/usb-musb.c @@ -261,7 +261,7 @@ static void musb_attach(USBPort *port); static void musb_detach(USBPort *port); -static void musb_schedule_cb(USBDevice *dev, USBPacket *p); +static void musb_schedule_cb(USBPort *port, USBPacket *p); static void musb_device_destroy(USBBus *bus, USBDevice *dev); static USBPortOps musb_port_ops = { @@ -517,7 +517,7 @@ static void musb_cb_tick1(void *opaque) #define musb_cb_tick (dir ? musb_cb_tick1 : musb_cb_tick0) -static void musb_schedule_cb(USBDevice *dev, USBPacket *packey) +static void musb_schedule_cb(USBPort *port, USBPacket *packey) { MUSBPacket *p = container_of(packey, MUSBPacket, p); MUSBEndPoint *ep = p->ep; @@ -615,7 +615,7 @@ static void musb_packet(MUSBState *s, MUSBEndPoint *ep, } ep->status[dir] = ret; - musb_schedule_cb(s->port.dev, &ep->packey[dir].p); + musb_schedule_cb(&s->port, &ep->packey[dir].p); } static void musb_tx_packet_complete(USBPacket *packey, void *opaque) -- cgit v1.2.3