diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2013-09-25 07:29:28 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-10-30 20:26:41 -0400 |
commit | 29685f6c6a6579bd580ca4d2b9dcb74214525dd1 (patch) | |
tree | 33440c19d43b6a8f93f301d5642f074d5aeedf79 | |
parent | c91c413e471974c69fc8ae1c3e0c86d71469fa05 (diff) |
mmc: msm_sdcc: Move away from using deprecated APIs
Suspend and resume of cards are being handled from the protocol layer
and consequently the mmc_suspend|resume_host APIs are deprecated.
This means we can simplify the suspend|resume callbacks by removing the
use of the deprecated APIs.
Additionally, remove dead code which also used the deprecated APIs.
Cc: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/host/msm_sdcc.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index b900de4e7e94..9405ecdaf6cf 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c | |||
@@ -1416,28 +1416,10 @@ ioremap_free: | |||
1416 | } | 1416 | } |
1417 | 1417 | ||
1418 | #ifdef CONFIG_PM | 1418 | #ifdef CONFIG_PM |
1419 | #ifdef CONFIG_MMC_MSM7X00A_RESUME_IN_WQ | ||
1420 | static void | ||
1421 | do_resume_work(struct work_struct *work) | ||
1422 | { | ||
1423 | struct msmsdcc_host *host = | ||
1424 | container_of(work, struct msmsdcc_host, resume_task); | ||
1425 | struct mmc_host *mmc = host->mmc; | ||
1426 | |||
1427 | if (mmc) { | ||
1428 | mmc_resume_host(mmc); | ||
1429 | if (host->stat_irq) | ||
1430 | enable_irq(host->stat_irq); | ||
1431 | } | ||
1432 | } | ||
1433 | #endif | ||
1434 | |||
1435 | |||
1436 | static int | 1419 | static int |
1437 | msmsdcc_suspend(struct platform_device *dev, pm_message_t state) | 1420 | msmsdcc_suspend(struct platform_device *dev, pm_message_t state) |
1438 | { | 1421 | { |
1439 | struct mmc_host *mmc = mmc_get_drvdata(dev); | 1422 | struct mmc_host *mmc = mmc_get_drvdata(dev); |
1440 | int rc = 0; | ||
1441 | 1423 | ||
1442 | if (mmc) { | 1424 | if (mmc) { |
1443 | struct msmsdcc_host *host = mmc_priv(mmc); | 1425 | struct msmsdcc_host *host = mmc_priv(mmc); |
@@ -1445,14 +1427,11 @@ msmsdcc_suspend(struct platform_device *dev, pm_message_t state) | |||
1445 | if (host->stat_irq) | 1427 | if (host->stat_irq) |
1446 | disable_irq(host->stat_irq); | 1428 | disable_irq(host->stat_irq); |
1447 | 1429 | ||
1448 | if (mmc->card && mmc->card->type != MMC_TYPE_SDIO) | 1430 | msmsdcc_writel(host, 0, MMCIMASK0); |
1449 | rc = mmc_suspend_host(mmc); | ||
1450 | if (!rc) | ||
1451 | msmsdcc_writel(host, 0, MMCIMASK0); | ||
1452 | if (host->clks_on) | 1431 | if (host->clks_on) |
1453 | msmsdcc_disable_clocks(host, 0); | 1432 | msmsdcc_disable_clocks(host, 0); |
1454 | } | 1433 | } |
1455 | return rc; | 1434 | return 0; |
1456 | } | 1435 | } |
1457 | 1436 | ||
1458 | static int | 1437 | static int |
@@ -1467,8 +1446,6 @@ msmsdcc_resume(struct platform_device *dev) | |||
1467 | 1446 | ||
1468 | msmsdcc_writel(host, host->saved_irq0mask, MMCIMASK0); | 1447 | msmsdcc_writel(host, host->saved_irq0mask, MMCIMASK0); |
1469 | 1448 | ||
1470 | if (mmc->card && mmc->card->type != MMC_TYPE_SDIO) | ||
1471 | mmc_resume_host(mmc); | ||
1472 | if (host->stat_irq) | 1449 | if (host->stat_irq) |
1473 | enable_irq(host->stat_irq); | 1450 | enable_irq(host->stat_irq); |
1474 | #if BUSCLK_PWRSAVE | 1451 | #if BUSCLK_PWRSAVE |