diff options
author | Daniel Walker <dwalker@codeaurora.org> | 2010-06-23 15:32:20 -0400 |
---|---|---|
committer | Daniel Walker <dwalker@codeaurora.org> | 2010-06-23 18:11:34 -0400 |
commit | 08ecfde47534ced67c3c16a15845456e83bd31d1 (patch) | |
tree | 6dbb2bb7b05a5ec0ff1ad3897f621435ecdbcd50 /drivers | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
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')
-rw-r--r-- | drivers/mmc/host/msm_sdcc.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index 24e09454e522..57e00cffb26b 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) | |||
1057 | return 0; | 1057 | return 0; |
1058 | } | 1058 | } |
1059 | 1059 | ||
1060 | #ifdef CONFIG_MMC_MSM7X00A_RESUME_IN_WQ | ||
1061 | static void | ||
1062 | do_resume_work(struct work_struct *work) | ||
1063 | { | ||
1064 | struct msmsdcc_host *host = | ||
1065 | container_of(work, struct msmsdcc_host, resume_task); | ||
1066 | struct mmc_host *mmc = host->mmc; | ||
1067 | |||
1068 | if (mmc) { | ||
1069 | mmc_resume_host(mmc); | ||
1070 | if (host->stat_irq) | ||
1071 | enable_irq(host->stat_irq); | ||
1072 | } | ||
1073 | } | ||
1074 | #endif | ||
1075 | |||
1076 | static int | 1060 | static int |
1077 | msmsdcc_probe(struct platform_device *pdev) | 1061 | msmsdcc_probe(struct platform_device *pdev) |
1078 | { | 1062 | { |
@@ -1314,6 +1298,24 @@ msmsdcc_probe(struct platform_device *pdev) | |||
1314 | return ret; | 1298 | return ret; |
1315 | } | 1299 | } |
1316 | 1300 | ||
1301 | #ifdef CONFIG_PM | ||
1302 | #ifdef CONFIG_MMC_MSM7X00A_RESUME_IN_WQ | ||
1303 | static void | ||
1304 | do_resume_work(struct work_struct *work) | ||
1305 | { | ||
1306 | struct msmsdcc_host *host = | ||
1307 | container_of(work, struct msmsdcc_host, resume_task); | ||
1308 | struct mmc_host *mmc = host->mmc; | ||
1309 | |||
1310 | if (mmc) { | ||
1311 | mmc_resume_host(mmc); | ||
1312 | if (host->stat_irq) | ||
1313 | enable_irq(host->stat_irq); | ||
1314 | } | ||
1315 | } | ||
1316 | #endif | ||
1317 | |||
1318 | |||
1317 | static int | 1319 | static int |
1318 | msmsdcc_suspend(struct platform_device *dev, pm_message_t state) | 1320 | msmsdcc_suspend(struct platform_device *dev, pm_message_t state) |
1319 | { | 1321 | { |
@@ -1358,6 +1360,10 @@ msmsdcc_resume(struct platform_device *dev) | |||
1358 | } | 1360 | } |
1359 | return 0; | 1361 | return 0; |
1360 | } | 1362 | } |
1363 | #else | ||
1364 | #define msmsdcc_suspend 0 | ||
1365 | #define msmsdcc_resume 0 | ||
1366 | #endif | ||
1361 | 1367 | ||
1362 | static struct platform_driver msmsdcc_driver = { | 1368 | static struct platform_driver msmsdcc_driver = { |
1363 | .probe = msmsdcc_probe, | 1369 | .probe = msmsdcc_probe, |