mmc: sdhci-tegra: Always call sdhci suspend/resume functions
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 13 Aug 2010 01:17:47 +0000 (18:17 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:28:04 +0000 (16:28 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/mmc/host/sdhci-tegra.c

index e6c8f2405c44d452ae5a93afe13a5f387b065fd4..1b39a1ce2463d60373c91bc5e10e870b65bf0dcb 100644 (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