Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 615322f6 authored by Oliver Neukum's avatar Oliver Neukum Committed by Jiri Kosina
Browse files

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: default avatarOliver Neukum <oneukum@suse.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 67db8a80
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -710,6 +710,7 @@ int usbhid_open(struct hid_device *hid)
		 * Wait 50 msec for the queue to empty before allowing events
		 * to go through hid.
		 */
		if (res == 0 && !(hid->quirks & HID_QUIRK_ALWAYS_POLL))
			msleep(50);
		clear_bit(HID_RESUME_RUNNING, &usbhid->iofl);
	}