Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63045
b: refs/heads/master
c: 2986d0b
h: refs/heads/master
i:
  63043: 3a57512
v: v3
  • Loading branch information
Pierre Ossman committed Jul 25, 2007
1 parent f1f7dcd commit c79be9c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 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: cf795bfb3ad4e2f8f6bb346aa8edb8272d4c70a2
refs/heads/master: 2986d0bf23d97d68804ccfa80965073ccf1af242
13 changes: 8 additions & 5 deletions trunk/drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,17 @@ static void mmc_resume(struct mmc_host *host)
BUG_ON(!host->card);

mmc_claim_host(host);

err = mmc_init_card(host, host->ocr, host->card);
mmc_release_host(host);

if (err != MMC_ERR_NONE) {
mmc_remove(host);

mmc_claim_host(host);
mmc_detach_bus(host);
mmc_release_host(host);
}

mmc_release_host(host);
}

#else
Expand Down Expand Up @@ -567,14 +570,14 @@ int mmc_attach_mmc(struct mmc_host *host, u32 ocr)

err = mmc_add_card(host->card);
if (err)
goto reclaim_host;
goto remove_card;

return 0;

reclaim_host:
mmc_claim_host(host);
remove_card:
mmc_remove_card(host->card);
host->card = NULL;
mmc_claim_host(host);
err:
mmc_detach_bus(host);
mmc_release_host(host);
Expand Down
13 changes: 8 additions & 5 deletions trunk/drivers/mmc/core/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,14 +573,17 @@ static void mmc_sd_resume(struct mmc_host *host)
BUG_ON(!host->card);

mmc_claim_host(host);

err = mmc_sd_init_card(host, host->ocr, host->card);
mmc_release_host(host);

if (err != MMC_ERR_NONE) {
mmc_sd_remove(host);

mmc_claim_host(host);
mmc_detach_bus(host);
mmc_release_host(host);
}

mmc_release_host(host);
}

#else
Expand Down Expand Up @@ -648,14 +651,14 @@ int mmc_attach_sd(struct mmc_host *host, u32 ocr)

err = mmc_add_card(host->card);
if (err)
goto reclaim_host;
goto remove_card;

return 0;

reclaim_host:
mmc_claim_host(host);
remove_card:
mmc_remove_card(host->card);
host->card = NULL;
mmc_claim_host(host);
err:
mmc_detach_bus(host);
mmc_release_host(host);
Expand Down

0 comments on commit c79be9c

Please sign in to comment.