usb: pass USBEndpoint to usb_wakeup

Devices must specify which endpoint has data to transfer now.
The plan is to use the usb_wakeup() not only for remove wakeup support,
but for "data ready" signaling in general, so we can move away from
constant polling to event driven usb device emulation.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2012-01-17 13:25:46 +01:00
parent db4be873d3
commit 7567b51fbe
5 changed files with 15 additions and 7 deletions

View file

@ -70,8 +70,10 @@ void usb_device_reset(USBDevice *dev)
usb_device_handle_reset(dev);
}
void usb_wakeup(USBDevice *dev)
void usb_wakeup(USBEndpoint *ep)
{
USBDevice *dev = ep->dev;
if (dev->remote_wakeup && dev->port && dev->port->ops->wakeup) {
dev->port->ops->wakeup(dev->port);
}