Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219011
b: refs/heads/master
c: 87973ba
h: refs/heads/master
i:
  219009: 9aca56a
  219007: 2d1ec67
v: v3
  • Loading branch information
Ohad Ben-Cohen authored and Chris Ball committed Oct 23, 2010
1 parent 1176fae commit 5a54741
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40bba0c1ca83a370f749c8bc9afda71cf79ebd91
refs/heads/master: 87973ba27b751353e2915cb3aa5c0e0dc6a79a4f
9 changes: 9 additions & 0 deletions trunk/drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,11 @@ static void mmc_sdio_detect(struct mmc_host *host)
BUG_ON(!host);
BUG_ON(!host->card);

/* Make sure card is powered before detecting it */
err = pm_runtime_get_sync(&host->card->dev);
if (err < 0)
goto out;

mmc_claim_host(host);

/*
Expand All @@ -555,13 +560,17 @@ static void mmc_sdio_detect(struct mmc_host *host)

mmc_release_host(host);

out:
if (err) {
mmc_sdio_remove(host);

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

/* Tell PM core that we're done */
pm_runtime_put(&host->card->dev);
}

/*
Expand Down

0 comments on commit 5a54741

Please sign in to comment.