aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-09-26 04:54:30 -0400
committerChris Ball <cjb@laptop.org>2013-10-30 20:28:37 -0400
commit578aebc7d6eca1de7a641b7ab0e70db73a42bcfa (patch)
tree9c4617ffc134c0629bb44901ae67483f23313358 /drivers/mmc
parentccad9b973f50144dddd05e9704b0eb4060c316a3 (diff)
mmc: mmci: 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. Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index c3785edc0e92..9e8a482310d8 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1725,37 +1725,28 @@ static int mmci_suspend(struct device *dev)
1725{ 1725{
1726 struct amba_device *adev = to_amba_device(dev); 1726 struct amba_device *adev = to_amba_device(dev);
1727 struct mmc_host *mmc = amba_get_drvdata(adev); 1727 struct mmc_host *mmc = amba_get_drvdata(adev);
1728 int ret = 0;
1729 1728
1730 if (mmc) { 1729 if (mmc) {
1731 struct mmci_host *host = mmc_priv(mmc); 1730 struct mmci_host *host = mmc_priv(mmc);
1732 1731 pm_runtime_get_sync(dev);
1733 ret = mmc_suspend_host(mmc); 1732 writel(0, host->base + MMCIMASK0);
1734 if (ret == 0) {
1735 pm_runtime_get_sync(dev);
1736 writel(0, host->base + MMCIMASK0);
1737 }
1738 } 1733 }
1739 1734
1740 return ret; 1735 return 0;
1741} 1736}
1742 1737
1743static int mmci_resume(struct device *dev) 1738static int mmci_resume(struct device *dev)
1744{ 1739{
1745 struct amba_device *adev = to_amba_device(dev); 1740 struct amba_device *adev = to_amba_device(dev);
1746 struct mmc_host *mmc = amba_get_drvdata(adev); 1741 struct mmc_host *mmc = amba_get_drvdata(adev);
1747 int ret = 0;
1748 1742
1749 if (mmc) { 1743 if (mmc) {
1750 struct mmci_host *host = mmc_priv(mmc); 1744 struct mmci_host *host = mmc_priv(mmc);
1751
1752 writel(MCI_IRQENABLE, host->base + MMCIMASK0); 1745 writel(MCI_IRQENABLE, host->base + MMCIMASK0);
1753 pm_runtime_put(dev); 1746 pm_runtime_put(dev);
1754
1755 ret = mmc_resume_host(mmc);
1756 } 1747 }
1757 1748
1758 return ret; 1749 return 0;
1759} 1750}
1760#endif 1751#endif
1761 1752