提交 615322f6 编写于 作者: O Oliver Neukum 提交者: Jiri Kosina

HID: usbhid: no flushing if device is already polled

During open() it is unnecessary to wait for the device to flush
stale inputs if the device is polled while closed due to a quirk
or opening fails.
Signed-off-by: NOliver Neukum <oneukum@suse.com>
Signed-off-by: NJiri Kosina <jkosina@suse.com>
上级 67db8a80
......@@ -710,7 +710,8 @@ int usbhid_open(struct hid_device *hid)
* Wait 50 msec for the queue to empty before allowing events
* to go through hid.
*/
msleep(50);
if (res == 0 && !(hid->quirks & HID_QUIRK_ALWAYS_POLL))
msleep(50);
clear_bit(HID_RESUME_RUNNING, &usbhid->iofl);
}
done:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册