Skip to content

Commit

Permalink
HID: usbhid: discarded events don't abort idleness
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Jiri Kosina committed Nov 23, 2015
1 parent dfa0c5f commit cc8a9d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ static void hid_irq_in(struct urb *urb)

switch (urb->status) {
case 0: /* success */
usbhid_mark_busy(usbhid);
usbhid->retry_delay = 0;
if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open)
break;
usbhid_mark_busy(usbhid);
if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) {
hid_input_report(urb->context, HID_INPUT_REPORT,
urb->transfer_buffer,
Expand Down

0 comments on commit cc8a9d7

Please sign in to comment.