Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91860
b: refs/heads/master
c: 69626f2
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Jiri Kosina committed Apr 22, 2008
1 parent ac529a3 commit f71ad8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abdff0f7749a6696ba2a4238b675cbc55abcdb7a
refs/heads/master: 69626f23bce6521367ac1e6a2a6e8fba8f0a848a
4 changes: 3 additions & 1 deletion trunk/drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ static int hid_start_in(struct hid_device *hid)

spin_lock_irqsave(&usbhid->inlock, flags);
if (hid->open > 0 && !test_bit(HID_SUSPENDED, &usbhid->iofl) &&
!test_bit(HID_DISCONNECTED, &usbhid->iofl) &&
!test_and_set_bit(HID_IN_RUNNING, &usbhid->iofl)) {
rc = usb_submit_urb(usbhid->urbin, GFP_ATOMIC);
if (rc != 0)
Expand Down Expand Up @@ -155,7 +156,7 @@ static void hid_io_error(struct hid_device *hid)
spin_lock_irqsave(&usbhid->inlock, flags);

/* Stop when disconnected */
if (usb_get_intfdata(usbhid->intf) == NULL)
if (test_bit(HID_DISCONNECTED, &usbhid->iofl))
goto done;

/* If it has been a while since the last error, we'll assume
Expand Down Expand Up @@ -941,6 +942,7 @@ static void hid_disconnect(struct usb_interface *intf)

spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
usb_set_intfdata(intf, NULL);
set_bit(HID_DISCONNECTED, &usbhid->iofl);
spin_unlock_irq(&usbhid->inlock);
usb_kill_urb(usbhid->urbin);
usb_kill_urb(usbhid->urbout);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ struct hid_control_fifo {
#define HID_RESET_PENDING 4
#define HID_SUSPENDED 5
#define HID_CLEAR_HALT 6
#define HID_DISCONNECTED 7

struct hid_input {
struct list_head list;
Expand Down

0 comments on commit f71ad8a

Please sign in to comment.