diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-03-24 00:00:05 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-03-24 00:00:05 +0100 |
commit | a4a17543cee0f422b6348020d170d887f05e97fc (patch) | |
tree | b5058493aa0a8352a2b7a8175a9bfd1ba1eadbb5 /hw/usb/hid-logitech-dj.c | |
parent | 5ae3eabba2c39b02775be614447dd8baf6ae2d5d (diff) | |
download | qemu-a4a17543cee0f422b6348020d170d887f05e97fc.tar.gz |
unifying: implement IRoot completely
Do not treat IRoot special in hidpp_process_device_hidpp20, but
implement it as a generic feature using hidpp20_feature_call. This
makes it easier to re-use the error reporting stuff.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'hw/usb/hid-logitech-dj.c')
-rw-r--r-- | hw/usb/hid-logitech-dj.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c index 6de5fa4ba1..51be0e2410 100644 --- a/hw/usb/hid-logitech-dj.c +++ b/hw/usb/hid-logitech-dj.c @@ -399,20 +399,8 @@ static void hidpp_process_device_hidpp20(USBLtunifyState *s, HidppMsg *msg) { LHidDevice *hd = &s->devices[msg->device_index - 1]; Hidpp20Msg *func = (Hidpp20Msg *) msg; - uint8_t fn = func->func >> 4; int r; - if (func->feat_index == 0) { /* IRoot */ - if (fn == 1) { /* GetProtocolVersion */ - func->params_s[0] = (uint8_t) (hd->info.protocol_version >> 8); - func->params_s[1] = (uint8_t) hd->info.protocol_version; - hidpp_queue_output_report(s, msg); - } else { - hidpp20_queue_error(s, func, HIDPP20_ERR_CODE_INVALID_FUNCTION_ID); - } - return; - } - r = hidpp20_feature_call(hd, func); /* note: if r == 0, then the function is void and there is no output */ if (r > 0) { |