@@ -325,6 +325,14 @@ void b43_leds_exit(struct b43_wldev *dev)
b43_led_turn_off(dev, leds->led_radio.index, leds->led_radio.activelow);
}
+void b43_leds_stop(struct b43_wldev *dev)
+{
+ struct b43_leds *leds = &dev->wl->leds;
+
+ leds->stop = 1;
+ cancel_work_sync(&leds->work);
+}
+
void b43_leds_register(struct b43_wldev *dev)
{
unsigned int i;
@@ -63,6 +63,7 @@ void b43_leds_register(struct b43_wldev *dev);
void b43_leds_unregister(struct b43_wldev *dev);
void b43_leds_init(struct b43_wldev *dev);
void b43_leds_exit(struct b43_wldev *dev);
+void b43_leds_stop(struct b43_wldev *dev);
#else /* CONFIG_B43_LEDS */
@@ -84,6 +85,9 @@ static inline void b43_leds_init(struct b43_wldev *dev)
static inline void b43_leds_exit(struct b43_wldev *dev)
{
}
+static inline void b43_leds_stop(struct b43_wldev *dev)
+{
+}
#endif /* CONFIG_B43_LEDS */
#endif /* B43_LEDS_H_ */
@@ -4987,8 +4987,7 @@ static void b43_remove(struct ssb_device *dev)
* might have modified it. Restoring is important, so the networking
* stack can properly free resources. */
wl->hw->queues = wl->mac80211_initially_registered_queues;
- wl->leds.stop = 1;
- cancel_work_sync(&wl->leds.work);
+ b43_leds_stop(wldev);
ieee80211_unregister_hw(wl->hw);
}