Skip to contentSkip to conversation

rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB

PATCH In review Vishal Thanki 3 participants 3 messages Nov 16, 2016 – Nov 23, 2016 Ralink RT2X00 wireless LAN driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB

In device removal routine, usage of "#ifdef CONFIG_RT2X00_LIB_USB" will not cover the case when it is configured as module. This will omit the entire if-block which does cleanup of URBs and cancellation of pending work. Changing the #ifdef to #if IS_ENABLED() to fix it.

---
 drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +1 -1
index 17a0c1b..eb7b714 100644
@@ -1441,7 +1441,7 @@ 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 IS_ENABLED(CONFIG_RT2X00_LIB_USB)
 	if (rt2x00_is_usb(rt2x00dev)) {
 		usb_kill_anchored_urbs(rt2x00dev->anchor);
 		hrtimer_cancel(&rt2x00dev->txstatus_timer);
Signature · 1 line
2.4.11
#2 lore raw
In reply to Vishal Thanki
Quoted 7 lines · Vishal Thanki

In device removal routine, usage of "#ifdef CONFIG_RT2X00_LIB_USB" will not cover the case when it is configured as module. This will omit the entire if-block which does cleanup of URBs and cancellation of pending work. Changing the #ifdef to #if IS_ENABLED() to fix it.

Patch applied to wireless-drivers-next.git, thanks.

a083c8fd277b rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB

Signature · 6 lines
https://patchwork.kernel.org/patch/9431983/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches