aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/leds.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/leds.c')
-rw-r--r--drivers/net/wireless/b43/leds.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index ac5a322c84b7..fbe31e02688b 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -112,10 +112,7 @@ static void b43_led_brightness_set(struct led_classdev *led_dev,
112 struct b43_led *led = container_of(led_dev, struct b43_led, led_dev); 112 struct b43_led *led = container_of(led_dev, struct b43_led, led_dev);
113 struct b43_wl *wl = led->wl; 113 struct b43_wl *wl = led->wl;
114 114
115 /* The check for current_dev is only needed while unregistering, 115 if (likely(!wl->leds.stop)) {
116 * so it is sequencial and does not race. But we must not dereference
117 * current_dev here. */
118 if (likely(wl->current_dev)) {
119 atomic_set(&led->state, brightness); 116 atomic_set(&led->state, brightness);
120 ieee80211_queue_work(wl->hw, &wl->leds.work); 117 ieee80211_queue_work(wl->hw, &wl->leds.work);
121 } 118 }
@@ -314,6 +311,8 @@ void b43_leds_init(struct b43_wldev *dev)
314 break; 311 break;
315 } 312 }
316 } 313 }
314
315 dev->wl->leds.stop = 0;
317} 316}
318 317
319void b43_leds_exit(struct b43_wldev *dev) 318void b43_leds_exit(struct b43_wldev *dev)