From: Alan Stern Date: Wed, 30 May 2007 15:11:12 +0000 (-0400) Subject: USB HID: avoid flush_scheduled_work() X-Git-Tag: v2.6.23-rc1~1200^2^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fa45a4cffd0c4ab4e238e8ad3b4f9b0c10ac1f3;p=linux-2.6 USB HID: avoid flush_scheduled_work() 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index d91b9dac6d..093abb5c98 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -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);