diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-12-01 11:32:45 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2011-01-11 17:01:02 +0100 |
commit | 01eacab6e95267fd894d0c1013aa5bf55c320dc8 (patch) | |
tree | a25c25138a68f4700ac2a22f70110966b00d244e /hw/usb.c | |
parent | 618c169b577db64ac6589ad48825d2e11760d1a6 (diff) | |
download | qemu-01eacab6e95267fd894d0c1013aa5bf55c320dc8.zip qemu-01eacab6e95267fd894d0c1013aa5bf55c320dc8.tar.gz qemu-01eacab6e95267fd894d0c1013aa5bf55c320dc8.tar.bz2 |
usb: add usb_wakeup() + wakeup callback to port ops
Add wakeup callback to port ops for remote wakeup handling.
Also add a usb_wakeup() function for devices which want
trigger a remote wakeup.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb.c')
-rw-r--r-- | hw/usb.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -49,6 +49,13 @@ 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); + } +} + /**********************/ /* generic USB device helpers (you are not forced to use them when |