diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2013-10-02 17:37:09 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-10-31 01:28:40 +0100 |
commit | 9ec775f7efd6d17084b4f361804d2030d50fca0e (patch) | |
tree | 96e83ec6405aa185bbb7cf8f1fa819ffaafd76ad /drivers/mmc/card | |
parent | MIPS: db1235: Don't use MMC_CLKGATE (diff) | |
download | linux-9ec775f7efd6d17084b4f361804d2030d50fca0e.tar.xz linux-9ec775f7efd6d17084b4f361804d2030d50fca0e.zip |
mmc: Don't force card to active state when entering suspend/shutdown
By adding a card state that records if it is suspended or resumed, we
can accept asyncronus suspend/resume requests for the mmc and sd
bus_ops.
MMC_CAP_AGGRESSIVE_PM, will at request inactivity through the runtime
bus_ops callbacks, execute a suspend of the the card. In the state were
this has been done, we can receive a suspend request for the mmc bus,
which for sd and mmc forced the card to active state by a
pm_runtime_get_sync. In other words, the card was resumed and then
immediately suspended again, completely unnecessary.
Since the suspend/resume bus_ops callbacks for sd and mmc are now
capable of handling asynchronous requests, we no longer need to force
the card to active state before executing suspend. Evidently preventing
the above sequence for MMC_CAP_AGGRESSIVE_PM.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 1a3163f1407e..29d5d988a51c 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -2448,7 +2448,6 @@ static int _mmc_blk_suspend(struct mmc_card *card) struct mmc_blk_data *md = mmc_get_drvdata(card); if (md) { - pm_runtime_get_sync(&card->dev); mmc_queue_suspend(&md->queue); list_for_each_entry(part_md, &md->part, part) { mmc_queue_suspend(&part_md->queue); @@ -2483,7 +2482,6 @@ static int mmc_blk_resume(struct mmc_card *card) list_for_each_entry(part_md, &md->part, part) { mmc_queue_resume(&part_md->queue); } - pm_runtime_put(&card->dev); } return 0; } |