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

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: NOliver Neukum <oneukum@suse.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 dfa0c5fa
...@@ -274,10 +274,10 @@ static void hid_irq_in(struct urb *urb) ...@@ -274,10 +274,10 @@ static void hid_irq_in(struct urb *urb)
switch (urb->status) { switch (urb->status) {
case 0: /* success */ case 0: /* success */
usbhid_mark_busy(usbhid);
usbhid->retry_delay = 0; usbhid->retry_delay = 0;
if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open) if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open)
break; break;
usbhid_mark_busy(usbhid);
if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) { if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) {
hid_input_report(urb->context, HID_INPUT_REPORT, hid_input_report(urb->context, HID_INPUT_REPORT,
urb->transfer_buffer, urb->transfer_buffer,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册