From patchwork Tue Sep 15 20:32:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert Herranz X-Patchwork-Id: 47755 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8FKXDtN030288 for ; Tue, 15 Sep 2009 20:33:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753163AbZIOUdB (ORCPT ); Tue, 15 Sep 2009 16:33:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753472AbZIOUdB (ORCPT ); Tue, 15 Sep 2009 16:33:01 -0400 Received: from smtp138.mail.ukl.yahoo.com ([77.238.184.69]:46730 "HELO smtp138.mail.ukl.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752413AbZIOUdA (ORCPT ); Tue, 15 Sep 2009 16:33:00 -0400 Received: (qmail 26801 invoked from network); 15 Sep 2009 20:33:02 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.es; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer; b=gaisOls/Kxc7EhnpgNUwzYxDxBgMwbzhito6gdUkrJ+oZIpvIZwhlbcj+OMeanP6aVdsDS9/hoFUHAVdd4I8PpAnlE+m+E1bYQsjbtUB+Hxa5xbQ9z3OvYktPhajkybz5OosoQwz+7Heu+802ETebGO9LoANQjZ6Nboti6PzRoM= ; Received: from unknown (HELO localhost.localdomain) (albert_herranz@81.32.166.101 with login) by smtp138.mail.ukl.yahoo.com with SMTP; 15 Sep 2009 20:33:02 -0000 X-Yahoo-SMTP: yzfTu2iswBCrTtVxL1RxVhyxF0Jj1aEHQh0OXhvjVDt_5sQx X-YMail-OSG: q9TJ.HUVM1nNR7xpe.BI.wpjcE2UOiNXkCsRquvIaOBHuCryp8oKANSmm0VGFi_t8HSxZYFV5SZ4dXbDkcjDpNWxi5H9Vx_2w92JsF6R0UFxfm66JunWy4UFfXtKqWmqiqLxk_aQHPRK.amuawsPwthfaYhLMJHy1KwQDhvfvLm2uupJULySbsEnumr_cCPcbVfoQmQrFlQM1j2P5ZSGq1O8qlYbDkXz2yzy77twe5TfYd9xr070a6vOoI6tL8wj1OT.LhNc2c6ZdtUr.zKuVJdbWqIvhkdzfiS56Q-- X-Yahoo-Newman-Property: ymail-3 From: Albert Herranz To: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org Cc: Albert Herranz Subject: [PATCH] b43: fix build error if !CONFIG_B43_LEDS Date: Tue, 15 Sep 2009 22:32:54 +0200 Message-Id: <1253046774-14416-1-git-send-email-albert_herranz@yahoo.es> X-Mailer: git-send-email 1.6.0.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- drivers/net/wireless/b43/leds.c | 8 ++++++++ drivers/net/wireless/b43/leds.h | 4 ++++ drivers/net/wireless/b43/main.c | 3 +-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index fbe31e0..fbe3d4f 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 49d3da5..9592e4c 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 a8840ef..6c0ea21 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); }