aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-09-25 10:48:25 -0400
committerChris Ball <cjb@laptop.org>2013-10-30 20:28:30 -0400
commit83234ac895b769241771e1c23f889e0615780ffc (patch)
tree2f5b54afbd602aba3c57f9e385a2efbbf08384e5 /drivers/mmc
parent359bfcb42321e97b677539803f883c50205105e8 (diff)
mmc: wbsd: 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: Pierre Ossman <pierre@ossman.eu> 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/wbsd.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index e954b7758876..024c82414996 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -1814,28 +1814,11 @@ static void wbsd_pnp_remove(struct pnp_dev *dev)
1814 1814
1815#ifdef CONFIG_PM 1815#ifdef CONFIG_PM
1816 1816
1817static int wbsd_suspend(struct wbsd_host *host, pm_message_t state)
1818{
1819 BUG_ON(host == NULL);
1820
1821 return mmc_suspend_host(host->mmc);
1822}
1823
1824static int wbsd_resume(struct wbsd_host *host)
1825{
1826 BUG_ON(host == NULL);
1827
1828 wbsd_init_device(host);
1829
1830 return mmc_resume_host(host->mmc);
1831}
1832
1833static int wbsd_platform_suspend(struct platform_device *dev, 1817static int wbsd_platform_suspend(struct platform_device *dev,
1834 pm_message_t state) 1818 pm_message_t state)
1835{ 1819{
1836 struct mmc_host *mmc = platform_get_drvdata(dev); 1820 struct mmc_host *mmc = platform_get_drvdata(dev);
1837 struct wbsd_host *host; 1821 struct wbsd_host *host;
1838 int ret;
1839 1822
1840 if (mmc == NULL) 1823 if (mmc == NULL)
1841 return 0; 1824 return 0;
@@ -1844,12 +1827,7 @@ static int wbsd_platform_suspend(struct platform_device *dev,
1844 1827
1845 host = mmc_priv(mmc); 1828 host = mmc_priv(mmc);
1846 1829
1847 ret = wbsd_suspend(host, state);
1848 if (ret)
1849 return ret;
1850
1851 wbsd_chip_poweroff(host); 1830 wbsd_chip_poweroff(host);
1852
1853 return 0; 1831 return 0;
1854} 1832}
1855 1833
@@ -1872,7 +1850,8 @@ static int wbsd_platform_resume(struct platform_device *dev)
1872 */ 1850 */
1873 mdelay(5); 1851 mdelay(5);
1874 1852
1875 return wbsd_resume(host); 1853 wbsd_init_device(host);
1854 return 0;
1876} 1855}
1877 1856
1878#ifdef CONFIG_PNP 1857#ifdef CONFIG_PNP
@@ -1886,10 +1865,7 @@ static int wbsd_pnp_suspend(struct pnp_dev *pnp_dev, pm_message_t state)
1886 return 0; 1865 return 0;
1887 1866
1888 DBGF("Suspending...\n"); 1867 DBGF("Suspending...\n");
1889 1868 return 0;
1890 host = mmc_priv(mmc);
1891
1892 return wbsd_suspend(host, state);
1893} 1869}
1894 1870
1895static int wbsd_pnp_resume(struct pnp_dev *pnp_dev) 1871static int wbsd_pnp_resume(struct pnp_dev *pnp_dev)
@@ -1922,7 +1898,8 @@ static int wbsd_pnp_resume(struct pnp_dev *pnp_dev)
1922 */ 1898 */
1923 mdelay(5); 1899 mdelay(5);
1924 1900
1925 return wbsd_resume(host); 1901 wbsd_init_device(host);
1902 return 0;
1926} 1903}
1927 1904
1928#endif /* CONFIG_PNP */ 1905#endif /* CONFIG_PNP */