提交 bd190f90 编写于 作者: U Ulf Hansson 提交者: Chris Ball

mmc: mxcmmc: 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: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 68359079
...@@ -1250,28 +1250,20 @@ static int mxcmci_suspend(struct device *dev) ...@@ -1250,28 +1250,20 @@ static int mxcmci_suspend(struct device *dev)
{ {
struct mmc_host *mmc = dev_get_drvdata(dev); struct mmc_host *mmc = dev_get_drvdata(dev);
struct mxcmci_host *host = mmc_priv(mmc); struct mxcmci_host *host = mmc_priv(mmc);
int ret = 0;
if (mmc)
ret = mmc_suspend_host(mmc);
clk_disable_unprepare(host->clk_per); clk_disable_unprepare(host->clk_per);
clk_disable_unprepare(host->clk_ipg); clk_disable_unprepare(host->clk_ipg);
return 0;
return ret;
} }
static int mxcmci_resume(struct device *dev) static int mxcmci_resume(struct device *dev)
{ {
struct mmc_host *mmc = dev_get_drvdata(dev); struct mmc_host *mmc = dev_get_drvdata(dev);
struct mxcmci_host *host = mmc_priv(mmc); struct mxcmci_host *host = mmc_priv(mmc);
int ret = 0;
clk_prepare_enable(host->clk_per); clk_prepare_enable(host->clk_per);
clk_prepare_enable(host->clk_ipg); clk_prepare_enable(host->clk_ipg);
if (mmc) return 0;
ret = mmc_resume_host(mmc);
return ret;
} }
static const struct dev_pm_ops mxcmci_pm_ops = { static const struct dev_pm_ops mxcmci_pm_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册