summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-12-12 14:59:05 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-12-19 00:22:59 +0400
commit9fbe2a6dc71d85e166eea43842a55af3d62a4d7b (patch)
tree477b11be9f793038c973af7bf5c61b44836ba500 /drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
parent82d7f3c10cf41c681e4577bcbc070454e5774960 (diff)
downloadlinux-9fbe2a6dc71d85e166eea43842a55af3d62a4d7b.tar.xz
brcmfmac: remove brcmf_sdio_disconnect() function
Instead of calling brcmf_sdio_disconnect() expose brcmf_sdio_remove() and call it directly. Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c51
1 files changed, 21 insertions, 30 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index f3069b47fcf4..f214510e3bee 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -3973,33 +3973,6 @@ static void brcmf_sdio_release_dongle(struct brcmf_sdio *bus)
brcmf_dbg(TRACE, "Disconnected\n");
}
-/* Detach and free everything */
-static void brcmf_sdio_release(struct brcmf_sdio *bus)
-{
- brcmf_dbg(TRACE, "Enter\n");
-
- if (bus) {
- /* De-register interrupt handler */
- brcmf_sdiod_intr_unregister(bus->sdiodev);
-
- cancel_work_sync(&bus->datawork);
- if (bus->brcmf_wq)
- destroy_workqueue(bus->brcmf_wq);
-
- if (bus->sdiodev->bus_if->drvr) {
- brcmf_detach(bus->sdiodev->dev);
- brcmf_sdio_release_dongle(bus);
- }
-
- brcmu_pkt_buf_free_skb(bus->txglom_sgpad);
- brcmf_sdio_release_malloc(bus);
- kfree(bus->hdrbuf);
- kfree(bus);
- }
-
- brcmf_dbg(TRACE, "Disconnected\n");
-}
-
static struct brcmf_bus_ops brcmf_sdio_bus_ops = {
.stop = brcmf_sdio_bus_stop,
.preinit = brcmf_sdio_bus_preinit,
@@ -4116,15 +4089,33 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
return bus;
fail:
- brcmf_sdio_release(bus);
+ brcmf_sdio_remove(bus);
return NULL;
}
-void brcmf_sdio_disconnect(struct brcmf_sdio *bus)
+/* Detach and free everything */
+void brcmf_sdio_remove(struct brcmf_sdio *bus)
{
brcmf_dbg(TRACE, "Enter\n");
- brcmf_sdio_release(bus);
+ if (bus) {
+ /* De-register interrupt handler */
+ brcmf_sdiod_intr_unregister(bus->sdiodev);
+
+ cancel_work_sync(&bus->datawork);
+ if (bus->brcmf_wq)
+ destroy_workqueue(bus->brcmf_wq);
+
+ if (bus->sdiodev->bus_if->drvr) {
+ brcmf_detach(bus->sdiodev->dev);
+ brcmf_sdio_release_dongle(bus);
+ }
+
+ brcmu_pkt_buf_free_skb(bus->txglom_sgpad);
+ brcmf_sdio_release_malloc(bus);
+ kfree(bus->hdrbuf);
+ kfree(bus);
+ }
brcmf_dbg(TRACE, "Disconnected\n");
}