diff options
author | Oliver Neukum <oneukum@suse.com> | 2015-11-05 06:55:27 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-11-23 09:46:03 -0500 |
commit | cc8a9d79222c6b259ea9eceef21b94a5610616f0 (patch) | |
tree | ae01b3951f50ae0b2564b2ef05acece3ac54afad /drivers/hid | |
parent | dfa0c5faf1b8964fa508373232b4cb597a5c226b (diff) |
HID: usbhid: discarded events don't abort idleness
If an event is discarded the device stays idle. Just reverse the order of
check and marking busy.
Found by code inspection.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 36712e9f56c2..19a4364c9085 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -274,10 +274,10 @@ static void hid_irq_in(struct urb *urb) | |||
274 | 274 | ||
275 | switch (urb->status) { | 275 | switch (urb->status) { |
276 | case 0: /* success */ | 276 | case 0: /* success */ |
277 | usbhid_mark_busy(usbhid); | ||
278 | usbhid->retry_delay = 0; | 277 | usbhid->retry_delay = 0; |
279 | if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open) | 278 | if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open) |
280 | break; | 279 | break; |
280 | usbhid_mark_busy(usbhid); | ||
281 | if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) { | 281 | if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) { |
282 | hid_input_report(urb->context, HID_INPUT_REPORT, | 282 | hid_input_report(urb->context, HID_INPUT_REPORT, |
283 | urb->transfer_buffer, | 283 | urb->transfer_buffer, |