[PATCH] Fix build with no CONFIG_MMC.

andrzej zaborowski balrogg at gmail.com
Mon Sep 22 04:37:49 CEST 2008


I hit this when updating to 2.6.26.  Also if CONFIG_MMC is enabled this
patch converts this horrible horrible hack into a horrible hack by using
dev->resume() (untested).

Signed-off-by: Andrzej Zaborowski <balrog at zabor.org>
---
 arch/arm/mach-s3c2440/mach-gta02.c |    6 +++---
 drivers/mfd/glamo/glamo-mci.c      |    4 +---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index dcbefdd..2a5eae0 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -1420,12 +1420,12 @@ static int gta02_glamo_mci_all_dependencies_resumed(struct platform_device *dev)
 
 static void gta02_glamo_mci_suspending(struct platform_device *dev)
 {
-	void glamo_mci_resume(void *dev); /* little white lies about types */
-
-	resume_dep_glamo_mci_pcf.callback = glamo_mci_resume;
+#if defined(CONFIG_MFD_GLAMO_MCI) && defined(CONFIG_PM)
+	resume_dep_glamo_mci_pcf.callback = (void *)dev->dev.driver->resume;
 	resume_dep_glamo_mci_pcf.context = (void *)dev;
 	pcf50633_register_resume_dependency(pcf50633_global,
 						     &resume_dep_glamo_mci_pcf);
+#endif
 }
 
 
diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c
index 66cfd35..0e2d2ef 100644
--- a/drivers/mfd/glamo/glamo-mci.c
+++ b/drivers/mfd/glamo/glamo-mci.c
@@ -981,7 +981,7 @@ static int glamo_mci_suspend(struct platform_device *dev, pm_message_t state)
 	return ret;
 }
 
-int glamo_mci_resume(struct platform_device *dev)
+static int glamo_mci_resume(struct platform_device *dev)
 {
 	struct mmc_host *mmc = platform_get_drvdata(dev);
 	struct glamo_mci_host 	*host = mmc_priv(mmc);
@@ -1000,8 +1000,6 @@ int glamo_mci_resume(struct platform_device *dev)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(glamo_mci_resume);
-
 
 #else /* CONFIG_PM */
 #define glamo_mci_suspend NULL
-- 
1.5.3.4




More information about the openmoko-kernel mailing list