Searched hist:d2f311ec91984adb219ac6985d4dd72c37ae734d (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/hid/usbhid/ |
H A D | hid-core.c | diff d2f311ec91984adb219ac6985d4dd72c37ae734d Wed Sep 01 11:36:06 CDT 2021 Alan Stern <stern@rowland.harvard.edu> HID: usbhid: Simplify code in hid_submit_ctrl()
This patch makes a small simplification to the code in hid_submit_ctrl(). The test for maxpacket being > 0 is unnecessary, because endpoint 0 always has a maxpacket value which is >= 8.
Furthermore, endpoint 0's maxpacket value is always a power of 2, so instead of open-coding the round-to-next-multiple computation we can call the optimized round_up() routine.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|