Skip to content

Commit

Permalink
USB HID: avoid flush_scheduled_work()
Browse files Browse the repository at this point in the history
This patch (as914) replaces a call to flush_scheduled_work() with
cancel_work_sync(), in order to help avoid potential deadlocks.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Alan Stern authored and Jiri Kosina committed Jul 9, 2007
1 parent 3cd7098 commit 2fa45a4
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 @@ -956,7 +956,7 @@ static void hid_disconnect(struct usb_interface *intf)
usb_kill_urb(usbhid->urbctrl);

del_timer_sync(&usbhid->io_retry);
flush_scheduled_work();
cancel_work_sync(&usbhid->reset_work);

if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_disconnect(hid);
Expand Down

0 comments on commit 2fa45a4

Please sign in to comment.