]> git.baikalelectronics.ru Git - kernel.git/commit
HID: usbhid: do not sleep when opening device
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 10 Jun 2020 04:38:24 +0000 (21:38 -0700)
committerJiri Kosina <jkosina@suse.cz>
Tue, 16 Jun 2020 15:12:57 +0000 (17:12 +0200)
commit26475bce39d8f9a81017f31b5822a5ce8cca3999
treeeb80a20285237e6284e92fc5f546fde046e39f5d
parent48bef079d7f9eb32694b6f9eeb3f410a3c1fe59a
HID: usbhid: do not sleep when opening device

usbhid tries to give the device 50 milliseconds to drain its queues when
opening the device, but does it naively by simply sleeping in open handler,
which slows down device probing (and thus may affect overall boot time).

However we do not need to sleep as we can instead mark a point of time in
the future when we should start processing the events.

Reported-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/usbhid.h