mmc: sdhci-tegra: Always call sdhci suspend/resume functions

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
Dmitry Shmidt
2010-08-12 18:17:47 -07:00
committed by Colin Cross
parent da2d1c69d6
commit 1e1278227f

View File

@@ -179,28 +179,24 @@ static int tegra_sdhci_remove(struct platform_device *pdev)
static int tegra_sdhci_suspend(struct platform_device *pdev, pm_message_t state)
{
struct tegra_sdhci_host *host = platform_get_drvdata(pdev);
struct mmc_host *mmc = host->sdhci->mmc;
int ret = 0;
int ret;
ret = sdhci_suspend_host(host->sdhci, state);
if (ret)
pr_err("%s: failed, error = %d\n", __func__, ret);
if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO)) {
ret = sdhci_suspend_host(host->sdhci, state);
if (ret)
pr_err("%s: failed, error = %d\n", __func__, ret);
}
return ret;
}
static int tegra_sdhci_resume(struct platform_device *pdev)
{
struct tegra_sdhci_host *host = platform_get_drvdata(pdev);
struct mmc_host *mmc = host->sdhci->mmc;
int ret = 0;
int ret;
ret = sdhci_resume_host(host->sdhci);
if (ret)
pr_err("%s: failed, error = %d\n", __func__, ret);
if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO)) {
ret = sdhci_resume_host(host->sdhci);
if (ret)
pr_err("%s: failed, error = %d\n", __func__, ret);
}
return ret;
}
#else