Commit 727c9885 authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville

b43: Don't use struct wldev after detach.

Don't use struct wldev after detach. This fixes an oops on access.
Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a4d63a94
...@@ -348,9 +348,9 @@ void b43_leds_register(struct b43_wldev *dev) ...@@ -348,9 +348,9 @@ void b43_leds_register(struct b43_wldev *dev)
} }
} }
void b43_leds_unregister(struct b43_wldev *dev) void b43_leds_unregister(struct b43_wl *wl)
{ {
struct b43_leds *leds = &dev->wl->leds; struct b43_leds *leds = &wl->leds;
b43_unregister_led(&leds->led_tx); b43_unregister_led(&leds->led_tx);
b43_unregister_led(&leds->led_rx); b43_unregister_led(&leds->led_rx);
......
...@@ -60,7 +60,7 @@ enum b43_led_behaviour { ...@@ -60,7 +60,7 @@ enum b43_led_behaviour {
}; };
void b43_leds_register(struct b43_wldev *dev); void b43_leds_register(struct b43_wldev *dev);
void b43_leds_unregister(struct b43_wldev *dev); void b43_leds_unregister(struct b43_wl *wl);
void b43_leds_init(struct b43_wldev *dev); void b43_leds_init(struct b43_wldev *dev);
void b43_leds_exit(struct b43_wldev *dev); void b43_leds_exit(struct b43_wldev *dev);
void b43_leds_stop(struct b43_wldev *dev); void b43_leds_stop(struct b43_wldev *dev);
...@@ -76,7 +76,7 @@ struct b43_leds { ...@@ -76,7 +76,7 @@ struct b43_leds {
static inline void b43_leds_register(struct b43_wldev *dev) static inline void b43_leds_register(struct b43_wldev *dev)
{ {
} }
static inline void b43_leds_unregister(struct b43_wldev *dev) static inline void b43_leds_unregister(struct b43_wl *wl)
{ {
} }
static inline void b43_leds_init(struct b43_wldev *dev) static inline void b43_leds_init(struct b43_wldev *dev)
......
...@@ -4997,7 +4997,7 @@ static void b43_remove(struct ssb_device *dev) ...@@ -4997,7 +4997,7 @@ static void b43_remove(struct ssb_device *dev)
if (list_empty(&wl->devlist)) { if (list_empty(&wl->devlist)) {
b43_rng_exit(wl); b43_rng_exit(wl);
b43_leds_unregister(wldev); b43_leds_unregister(wl);
/* Last core on the chip unregistered. /* Last core on the chip unregistered.
* We can destroy common struct b43_wl. * We can destroy common struct b43_wl.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment