diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-06-21 11:52:28 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2011-06-30 12:27:49 +0200 |
commit | 2cb5f65222123269708d24be512f80951b893f37 (patch) | |
tree | fd7b8ccc02a5911ec6ddedc30c3697c6d49a3485 /hw/usb.c | |
parent | 1185b2f8f7dd637ecb0d09cea40862f5e8a7c9b8 (diff) |
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.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'hw/usb.c')
-rw-r--r-- | hw/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -52,7 +52,7 @@ void usb_attach(USBPort *port, USBDevice *dev) void usb_wakeup(USBDevice *dev) { if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) { - dev->port->ops->wakeup(dev); + dev->port->ops->wakeup(dev->port); } } @@ -335,7 +335,7 @@ void usb_packet_complete(USBDevice *dev, USBPacket *p) { /* Note: p->owner != dev is possible in case dev is a hub */ assert(p->owner != NULL); - dev->port->ops->complete(dev, p); + dev->port->ops->complete(dev->port, p); p->owner = NULL; } |