HID: sync on deleted io_retry timer in usbhid driver
authorJiri Slaby <jirislaby@gmail.com>
Mon, 27 Oct 2008 11:16:16 +0000 (12:16 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 27 Oct 2008 14:07:08 +0000 (15:07 +0100)
When suspending, make sure that the timer is not running
any more.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c

index 3b1c489998c3a93a28dbdb5f4ce959c3b63c952f..18e5ddd722cd5887d71c38d2cbfbf46e20553f1a 100644 (file)
@@ -1047,7 +1047,7 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
        spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
        set_bit(HID_SUSPENDED, &usbhid->iofl);
        spin_unlock_irq(&usbhid->inlock);
-       del_timer(&usbhid->io_retry);
+       del_timer_sync(&usbhid->io_retry);
        usb_kill_urb(usbhid->urbin);
        mutex_unlock(&usbhid->setup);
        dev_dbg(&intf->dev, "suspend\n");