Commit 090f0d58 authored by Högander Jouni's avatar Högander Jouni Committed by Tony Lindgren

OMAP: HSMMC: Check wether board specific suspend / resume exists

Do not try to call board specific suspend / resume functions if there
is no such.
Signed-off-by: default avatarJouni Högander <jouni.hogander@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 1bf4c593
...@@ -960,11 +960,13 @@ static int omap_mmc_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -960,11 +960,13 @@ static int omap_mmc_suspend(struct platform_device *pdev, pm_message_t state)
OMAP_HSMMC_WRITE(host->base, ISE, 0); OMAP_HSMMC_WRITE(host->base, ISE, 0);
OMAP_HSMMC_WRITE(host->base, IE, 0); OMAP_HSMMC_WRITE(host->base, IE, 0);
ret = host->pdata->suspend(&pdev->dev, host->slot_id); if (host->pdata->suspend) {
if (ret) ret = host->pdata->suspend(&pdev->dev, host->slot_id);
dev_dbg(mmc_dev(host->mmc), if (ret)
"Unable to handle MMC board" dev_dbg(mmc_dev(host->mmc),
" level suspend\n"); "Unable to handle MMC board"
" level suspend\n");
}
if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) { if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {
OMAP_HSMMC_WRITE(host->base, HCTL, OMAP_HSMMC_WRITE(host->base, HCTL,
...@@ -1013,10 +1015,12 @@ static int omap_mmc_resume(struct platform_device *pdev) ...@@ -1013,10 +1015,12 @@ static int omap_mmc_resume(struct platform_device *pdev)
dev_dbg(mmc_dev(host->mmc), dev_dbg(mmc_dev(host->mmc),
"Enabling debounce clk failed\n"); "Enabling debounce clk failed\n");
ret = host->pdata->resume(&pdev->dev, host->slot_id); if (host->pdata->resume) {
if (ret) ret = host->pdata->resume(&pdev->dev, host->slot_id);
dev_dbg(mmc_dev(host->mmc), if (ret)
dev_dbg(mmc_dev(host->mmc),
"Unmask interrupt failed\n"); "Unmask interrupt failed\n");
}
/* Notify the core to resume the host */ /* Notify the core to resume the host */
ret = mmc_resume_host(host->mmc); ret = mmc_resume_host(host->mmc);
......
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