]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
rt2x00usb: Use usb anchor to manage URB
[karo-tx-linux.git] / drivers / net / wireless / ralink / rt2x00 / rt2x00dev.c
index 5639ed816813b21d886fe4e6011af7677e9b1aca..b2f7c586045d24ac0aa29bad9c79d9b0ac1f3666 100644 (file)
@@ -1422,11 +1422,14 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
        cancel_work_sync(&rt2x00dev->intf_work);
        cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);
        cancel_work_sync(&rt2x00dev->sleep_work);
+#ifdef CONFIG_RT2X00_LIB_USB
        if (rt2x00_is_usb(rt2x00dev)) {
+               usb_kill_anchored_urbs(rt2x00dev->anchor);
                hrtimer_cancel(&rt2x00dev->txstatus_timer);
                cancel_work_sync(&rt2x00dev->rxdone_work);
                cancel_work_sync(&rt2x00dev->txdone_work);
        }
+#endif
        if (rt2x00dev->workqueue)
                destroy_workqueue(rt2x00dev->workqueue);