Commit c88cb98e authored by Cai Huoqing's avatar Cai Huoqing Committed by Ulf Hansson

mmc: omap_hsmmc: Make use of the helper macro SET_RUNTIME_PM_OPS()

Use the helper macro SET_RUNTIME_PM_OPS() instead of the verbose
operators ".runtime_suspend/.runtime_resume", because the
SET_RUNTIME_PM_OPS() is a nice helper macro that could be brought
in to make code a little more concise.
Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20210907025940.1535-1-caihuoqing@baidu.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent b3f8eb6e
...@@ -702,11 +702,6 @@ static void omap_hsmmc_context_save(struct omap_hsmmc_host *host) ...@@ -702,11 +702,6 @@ static void omap_hsmmc_context_save(struct omap_hsmmc_host *host)
#else #else
static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
{
return 0;
}
static void omap_hsmmc_context_save(struct omap_hsmmc_host *host) static void omap_hsmmc_context_save(struct omap_hsmmc_host *host)
{ {
} }
...@@ -2086,6 +2081,7 @@ static int omap_hsmmc_resume(struct device *dev) ...@@ -2086,6 +2081,7 @@ static int omap_hsmmc_resume(struct device *dev)
} }
#endif #endif
#ifdef CONFIG_PM
static int omap_hsmmc_runtime_suspend(struct device *dev) static int omap_hsmmc_runtime_suspend(struct device *dev)
{ {
struct omap_hsmmc_host *host; struct omap_hsmmc_host *host;
...@@ -2153,11 +2149,11 @@ static int omap_hsmmc_runtime_resume(struct device *dev) ...@@ -2153,11 +2149,11 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
spin_unlock_irqrestore(&host->irq_lock, flags); spin_unlock_irqrestore(&host->irq_lock, flags);
return 0; return 0;
} }
#endif
static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = { static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume) SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume)
.runtime_suspend = omap_hsmmc_runtime_suspend, SET_RUNTIME_PM_OPS(omap_hsmmc_runtime_suspend, omap_hsmmc_runtime_resume, NULL)
.runtime_resume = omap_hsmmc_runtime_resume,
}; };
static struct platform_driver omap_hsmmc_driver = { static struct platform_driver omap_hsmmc_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment