From patchwork Thu Oct 1 13:54:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 50933 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 n91Dsx9B009765 for ; Thu, 1 Oct 2009 13:54:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756344AbZJANyx (ORCPT ); Thu, 1 Oct 2009 09:54:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756388AbZJANyx (ORCPT ); Thu, 1 Oct 2009 09:54:53 -0400 Received: from bu3sch.de ([62.75.166.246]:45246 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756320AbZJANyw (ORCPT ); Thu, 1 Oct 2009 09:54:52 -0400 Received: by vs166246.vserver.de with esmtpa (Exim 4.69) id 1MtM7T-0007G4-5M; Thu, 01 Oct 2009 13:54:55 +0000 From: Michael Buesch To: linville@tuxdriver.com Subject: [PATCH] b43: Don't use struct wldev after detach. Date: Thu, 1 Oct 2009 15:54:32 +0200 User-Agent: KMail/1.9.9 Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org X-Move-Along: Nothing to see here. No, really... Nothing. MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200910011554.34488.mb@bu3sch.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --- wireless-testing.orig/drivers/net/wireless/b43/leds.c +++ wireless-testing/drivers/net/wireless/b43/leds.c @@ -348,9 +348,9 @@ void b43_leds_register(struct b43_wldev } } -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_rx); --- wireless-testing.orig/drivers/net/wireless/b43/leds.h +++ wireless-testing/drivers/net/wireless/b43/leds.h @@ -60,7 +60,7 @@ enum b43_led_behaviour { }; 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_exit(struct b43_wldev *dev); void b43_leds_stop(struct b43_wldev *dev); @@ -76,7 +76,7 @@ struct b43_leds { 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) --- wireless-testing.orig/drivers/net/wireless/b43/main.c +++ wireless-testing/drivers/net/wireless/b43/main.c @@ -4997,7 +4997,7 @@ static void b43_remove(struct ssb_device if (list_empty(&wl->devlist)) { b43_rng_exit(wl); - b43_leds_unregister(wldev); + b43_leds_unregister(wl); /* Last core on the chip unregistered. * We can destroy common struct b43_wl. */