summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@codeaurora.org>2010-06-23 12:32:20 -0700
committerDaniel Walker <dwalker@codeaurora.org>2010-06-23 15:11:34 -0700
commit08ecfde47534ced67c3c16a15845456e83bd31d1 (patch)
tree6dbb2bb7b05a5ec0ff1ad3897f621435ecdbcd50 /drivers/mmc
parent7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff)
downloadop-kernel-dev-08ecfde47534ced67c3c16a15845456e83bd31d1.zip
op-kernel-dev-08ecfde47534ced67c3c16a15845456e83bd31d1.tar.gz
mmc: msm: fix up build breakage on !PM
with PM disabled I get the following compile error, drivers/built-in.o: In function `msmsdcc_resume': linux-2.6/drivers/mmc/host/msm_sdcc.c:1352: undefined reference to `mmc_resume_host' drivers/built-in.o: In function `msmsdcc_suspend': linux-2.6/drivers/mmc/host/msm_sdcc.c:1330: undefined reference to `mmc_suspend_host' This adds ifdefs around the suspend/resume functions to prevent this. Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/msm_sdcc.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 24e0945..57e00cf 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1057,22 +1057,6 @@ msmsdcc_init_dma(struct msmsdcc_host *host)
return 0;
}
-#ifdef CONFIG_MMC_MSM7X00A_RESUME_IN_WQ
-static void
-do_resume_work(struct work_struct *work)
-{
- struct msmsdcc_host *host =
- container_of(work, struct msmsdcc_host, resume_task);
- struct mmc_host *mmc = host->mmc;
-
- if (mmc) {
- mmc_resume_host(mmc);
- if (host->stat_irq)
- enable_irq(host->stat_irq);
- }
-}
-#endif
-
static int
msmsdcc_probe(struct platform_device *pdev)
{
@@ -1314,6 +1298,24 @@ msmsdcc_probe(struct platform_device *pdev)
return ret;
}
+#ifdef CONFIG_PM
+#ifdef CONFIG_MMC_MSM7X00A_RESUME_IN_WQ
+static void
+do_resume_work(struct work_struct *work)
+{
+ struct msmsdcc_host *host =
+ container_of(work, struct msmsdcc_host, resume_task);
+ struct mmc_host *mmc = host->mmc;
+
+ if (mmc) {
+ mmc_resume_host(mmc);
+ if (host->stat_irq)
+ enable_irq(host->stat_irq);
+ }
+}
+#endif
+
+
static int
msmsdcc_suspend(struct platform_device *dev, pm_message_t state)
{
@@ -1358,6 +1360,10 @@ msmsdcc_resume(struct platform_device *dev)
}
return 0;
}
+#else
+#define msmsdcc_suspend 0
+#define msmsdcc_resume 0
+#endif
static struct platform_driver msmsdcc_driver = {
.probe = msmsdcc_probe,
OpenPOWER on IntegriCloud