Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267439
b: refs/heads/master
c: 9917124
h: refs/heads/master
i:
  267437: 1c4bd5f
  267435: 715521c
  267431: f94c83a
  267423: 6b5fbb8
v: v3
  • Loading branch information
Franky Lin authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 59b6c10 commit 51ae335
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f188ea3d9c8457cdc788bb509929908b80efe46
refs/heads/master: 9917124f23210da0d07491b33e7eae004f908f78
32 changes: 14 additions & 18 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ static struct brcmf_sdioh_driver drvinfo = { NULL, NULL };

module_param(sd_f2_blocksize, int, 0);

int brcmf_sdcard_detach(struct brcmf_sdio_card *card)
{
if (card != NULL) {
if (card->sdioh) {
brcmf_sdioh_detach(card->sdioh);
card->sdioh = NULL;
}
kfree(card);
}

return 0;
}

int
brcmf_sdcard_iovar_op(struct brcmf_sdio_card *card, const char *name,
void *params, int plen, void *arg, int len, bool set)
Expand Down Expand Up @@ -441,7 +428,6 @@ int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)

sdiodev->card->sdioh = brcmf_sdioh_attach((void *)0);
if (!sdiodev->card->sdioh) {
brcmf_sdcard_detach(sdiodev->card);
ret = -ENODEV;
goto out;
}
Expand All @@ -466,17 +452,27 @@ int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
}

out:
if ((ret) && (sdiodev->card))
brcmf_sdcard_detach(sdiodev->card);
if (ret)
brcmf_sdio_remove(sdiodev);

return ret;
}
EXPORT_SYMBOL(brcmf_sdio_probe);

int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev)
{
drvinfo.detach(sdiodev->bus);
brcmf_sdcard_detach(sdiodev->card);
if (sdiodev->bus) {
drvinfo.detach(sdiodev->bus);
sdiodev->bus = NULL;
}

if (sdiodev->card) {
if (sdiodev->card->sdioh)
brcmf_sdioh_detach(sdiodev->card->sdioh);
kfree(sdiodev->card);
sdiodev->card = NULL;
}

return 0;
}
EXPORT_SYMBOL(brcmf_sdio_remove);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/staging/brcm80211/brcmfmac/sdio_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ struct brcmf_sdio_dev {
void *bus;
};

/* Detach - freeup resources allocated in attach */
extern int brcmf_sdcard_detach(struct brcmf_sdio_card *card);

/* Enable/disable SD interrupt */
extern int brcmf_sdcard_intr_enable(struct brcmf_sdio_card *card);
extern int brcmf_sdcard_intr_disable(struct brcmf_sdio_card *card);
Expand Down

0 comments on commit 51ae335

Please sign in to comment.