Skip to content

Commit fa20bad

Browse files
mdevaevgregkh
authored andcommitted
usb: gadget: f_hid: idle uses the highest byte for duration
SET_IDLE value must be shifted 8 bits to the right to get duration. This confirmed by USBCV test. Fixes: afcff6d ("usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers") Cc: stable <[email protected]> Signed-off-by: Maxim Devaev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8e33412 commit fa20bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/function/f_hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ static int hidg_setup(struct usb_function *f,
573573
| HID_REQ_SET_IDLE):
574574
VDBG(cdev, "set_idle\n");
575575
length = 0;
576-
hidg->idle = value;
576+
hidg->idle = value >> 8;
577577
goto respond;
578578
break;
579579

0 commit comments

Comments
 (0)