From: Albert Herranz Date: Tue, 15 Sep 2009 22:26:19 +0000 (+0200) Subject: b43: fix build error if !CONFIG_B43_LEDS X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=82905ace22614fe220875fc5748b1afbac868a76;p=linux-beck.git b43: fix build error if !CONFIG_B43_LEDS Fix the following build error when CONFIG_B43_LEDS is not selected: drivers/net/wireless/b43/main.c: In function 'b43_remove': drivers/net/wireless/b43/main.c:4990: error: 'struct b43_leds' has no member named 'stop' drivers/net/wireless/b43/main.c:4991: error: 'struct b43_leds' has no member named 'work' make[4]: *** [drivers/net/wireless/b43/main.o] Error 1 Signed-off-by: Albert Herranz Signed-off-by: Michael Buesch Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index fbe31e02688b..fbe3d4f62ce2 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c @@ -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; diff --git a/drivers/net/wireless/b43/leds.h b/drivers/net/wireless/b43/leds.h index 49d3da540c28..9592e4c5a5f5 100644 --- a/drivers/net/wireless/b43/leds.h +++ b/drivers/net/wireless/b43/leds.h @@ -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_ */ diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index a8840ef63770..6c0ea214a82e 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -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); }