aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/omap_hsmmc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index c9401efd1137..d25b19b3ca29 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2267,10 +2267,12 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
2267} 2267}
2268 2268
2269#ifdef CONFIG_PM 2269#ifdef CONFIG_PM
2270static int omap_hsmmc_suspend(struct platform_device *pdev, pm_message_t state) 2270static int omap_hsmmc_suspend(struct device *dev)
2271{ 2271{
2272 int ret = 0; 2272 int ret = 0;
2273 struct platform_device *pdev = to_platform_device(dev);
2273 struct omap_hsmmc_host *host = platform_get_drvdata(pdev); 2274 struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
2275 pm_message_t state = PMSG_SUSPEND; /* unused by MMC core */
2274 2276
2275 if (host && host->suspended) 2277 if (host && host->suspended)
2276 return 0; 2278 return 0;
@@ -2316,9 +2318,10 @@ static int omap_hsmmc_suspend(struct platform_device *pdev, pm_message_t state)
2316} 2318}
2317 2319
2318/* Routine to resume the MMC device */ 2320/* Routine to resume the MMC device */
2319static int omap_hsmmc_resume(struct platform_device *pdev) 2321static int omap_hsmmc_resume(struct device *dev)
2320{ 2322{
2321 int ret = 0; 2323 int ret = 0;
2324 struct platform_device *pdev = to_platform_device(dev);
2322 struct omap_hsmmc_host *host = platform_get_drvdata(pdev); 2325 struct omap_hsmmc_host *host = platform_get_drvdata(pdev);
2323 2326
2324 if (host && !host->suspended) 2327 if (host && !host->suspended)
@@ -2369,13 +2372,17 @@ clk_en_err:
2369#define omap_hsmmc_resume NULL 2372#define omap_hsmmc_resume NULL
2370#endif 2373#endif
2371 2374
2372static struct platform_driver omap_hsmmc_driver = { 2375static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
2373 .remove = omap_hsmmc_remove,
2374 .suspend = omap_hsmmc_suspend, 2376 .suspend = omap_hsmmc_suspend,
2375 .resume = omap_hsmmc_resume, 2377 .resume = omap_hsmmc_resume,
2378};
2379
2380static struct platform_driver omap_hsmmc_driver = {
2381 .remove = omap_hsmmc_remove,
2376 .driver = { 2382 .driver = {
2377 .name = DRIVER_NAME, 2383 .name = DRIVER_NAME,
2378 .owner = THIS_MODULE, 2384 .owner = THIS_MODULE,
2385 .pm = &omap_hsmmc_dev_pm_ops,
2379 }, 2386 },
2380}; 2387};
2381 2388