diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-11-30 17:35:34 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2011-01-11 15:56:01 +0100 |
commit | ed5a83ddd8c1d8ec7b1015315530cf29949e7c48 (patch) | |
tree | 6c78080c354298840f92b088ec866ed90147fb0e /hw/usb-hid.c | |
parent | a980a065fb5e86d6dec337e6cb6ff432f1a143c9 (diff) | |
download | qemu-ed5a83ddd8c1d8ec7b1015315530cf29949e7c48.zip |
usb: move remote wakeup handling to common code
This patch moves setting and clearing the remote_wakeup feature
bit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. Also
USB_REQ_GET_STATUS handling is moved to common code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-hid.c')
-rw-r--r-- | hw/usb-hid.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 21c0c7224c..1c3596025f 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -673,28 +673,6 @@ static int usb_hid_handle_control(USBDevice *dev, int request, int value, ret = 0; switch(request) { - case DeviceRequest | USB_REQ_GET_STATUS: - data[0] = (1 << USB_DEVICE_SELF_POWERED) | - (dev->remote_wakeup << USB_DEVICE_REMOTE_WAKEUP); - data[1] = 0x00; - ret = 2; - break; - case DeviceOutRequest | USB_REQ_CLEAR_FEATURE: - if (value == USB_DEVICE_REMOTE_WAKEUP) { - dev->remote_wakeup = 0; - } else { - goto fail; - } - ret = 0; - break; - case DeviceOutRequest | USB_REQ_SET_FEATURE: - if (value == USB_DEVICE_REMOTE_WAKEUP) { - dev->remote_wakeup = 1; - } else { - goto fail; - } - ret = 0; - break; case DeviceRequest | USB_REQ_GET_INTERFACE: data[0] = 0; ret = 1; |