Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269430
b: refs/heads/master
c: 1c3be36
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Sep 22, 2011
1 parent 7141cbc commit 011dc82
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 92b97f0aaccbf9de4a29696e6253bf82e8850d1d
refs/heads/master: 1c3be369c5fcd36c5d3841ca5d97d80ad34e76dd
12 changes: 12 additions & 0 deletions trunk/drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/amba/mmci.h>
#include <linux/pm_runtime.h>

#include <asm/div64.h>
#include <asm/io.h>
Expand Down Expand Up @@ -170,6 +171,7 @@ mmci_request_end(struct mmci_host *host, struct mmc_request *mrq)
* back into the driver...
*/
spin_unlock(&host->lock);
pm_runtime_put(mmc_dev(host->mmc));
mmc_request_done(host->mmc, mrq);
spin_lock(&host->lock);
}
Expand Down Expand Up @@ -984,6 +986,8 @@ static void mmci_request(struct mmc_host *mmc, struct mmc_request *mrq)
return;
}

pm_runtime_get_sync(mmc_dev(mmc));

spin_lock_irqsave(&host->lock, flags);

host->mrq = mrq;
Expand Down Expand Up @@ -1327,6 +1331,8 @@ static int __devinit mmci_probe(struct amba_device *dev,

mmci_dma_setup(host);

pm_runtime_put(&dev->dev);

mmc_add_host(mmc);

return 0;
Expand Down Expand Up @@ -1364,6 +1370,12 @@ static int __devexit mmci_remove(struct amba_device *dev)
if (mmc) {
struct mmci_host *host = mmc_priv(mmc);

/*
* Undo pm_runtime_put() in probe. We use the _sync
* version here so that we can access the primecell.
*/
pm_runtime_get_sync(&dev->dev);

mmc_remove_host(mmc);

writel(0, host->base + MMCIMASK0);
Expand Down

0 comments on commit 011dc82

Please sign in to comment.