diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2014-10-06 05:29:42 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-10 06:40:33 -0500 |
commit | 0967edc6ef5c3c181cabde3178ea9f33e5130e4a (patch) | |
tree | f4a76db2682f67544b161714a2f065bb6b0ed614 /drivers/mmc/card | |
parent | 433b7b1210a4ece4f2b4f1b04f31a2f0928c8aa8 (diff) |
mmc: core: Convert the mmc_driver to use the modern PM ops
Instead of having specific mmc system PM callbacks for the mmc driver,
let's convert to use the common ones.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/block.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index a11451f4f408..dfbdfb995dd3 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -2516,15 +2516,17 @@ static void mmc_blk_shutdown(struct mmc_card *card) | |||
2516 | _mmc_blk_suspend(card); | 2516 | _mmc_blk_suspend(card); |
2517 | } | 2517 | } |
2518 | 2518 | ||
2519 | #ifdef CONFIG_PM | 2519 | #ifdef CONFIG_PM_SLEEP |
2520 | static int mmc_blk_suspend(struct mmc_card *card) | 2520 | static int mmc_blk_suspend(struct device *dev) |
2521 | { | 2521 | { |
2522 | struct mmc_card *card = mmc_dev_to_card(dev); | ||
2522 | return _mmc_blk_suspend(card); | 2523 | return _mmc_blk_suspend(card); |
2523 | } | 2524 | } |
2524 | 2525 | ||
2525 | static int mmc_blk_resume(struct mmc_card *card) | 2526 | static int mmc_blk_resume(struct device *dev) |
2526 | { | 2527 | { |
2527 | struct mmc_blk_data *part_md; | 2528 | struct mmc_blk_data *part_md; |
2529 | struct mmc_card *card = mmc_dev_to_card(dev); | ||
2528 | struct mmc_blk_data *md = mmc_get_drvdata(card); | 2530 | struct mmc_blk_data *md = mmc_get_drvdata(card); |
2529 | 2531 | ||
2530 | if (md) { | 2532 | if (md) { |
@@ -2540,19 +2542,17 @@ static int mmc_blk_resume(struct mmc_card *card) | |||
2540 | } | 2542 | } |
2541 | return 0; | 2543 | return 0; |
2542 | } | 2544 | } |
2543 | #else | ||
2544 | #define mmc_blk_suspend NULL | ||
2545 | #define mmc_blk_resume NULL | ||
2546 | #endif | 2545 | #endif |
2547 | 2546 | ||
2547 | static SIMPLE_DEV_PM_OPS(mmc_blk_pm_ops, mmc_blk_suspend, mmc_blk_resume); | ||
2548 | |||
2548 | static struct mmc_driver mmc_driver = { | 2549 | static struct mmc_driver mmc_driver = { |
2549 | .drv = { | 2550 | .drv = { |
2550 | .name = "mmcblk", | 2551 | .name = "mmcblk", |
2552 | .pm = &mmc_blk_pm_ops, | ||
2551 | }, | 2553 | }, |
2552 | .probe = mmc_blk_probe, | 2554 | .probe = mmc_blk_probe, |
2553 | .remove = mmc_blk_remove, | 2555 | .remove = mmc_blk_remove, |
2554 | .suspend = mmc_blk_suspend, | ||
2555 | .resume = mmc_blk_resume, | ||
2556 | .shutdown = mmc_blk_shutdown, | 2556 | .shutdown = mmc_blk_shutdown, |
2557 | }; | 2557 | }; |
2558 | 2558 | ||