1 From bc2caff9cdef8a16297a2cb196306f88fa5ea2c2 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Thu, 2 Oct 2008 12:40:10 +0100
4 Subject: [PATCH] revert-fix-build-with-no-config_mmc-glamo-resume-callback-part.patch
6 Thomas White noticed that the recent patch from Andrzej cleaning up a
7 nasty cast in the resume_dependency stuff for Glamo broke resume. The
8 problem was that the wrong resume callback was arrived at by the new
9 code, the one in the device's device_driver struct rather than the
10 struct platform_driver that actually holds the right pointer.
12 Since this code will be gone in 2.6.26, I reverted this part of Andrzej's
13 patch, tidying the cast a bit anyway.
15 Reported-by: Thomas White <taw27@cam.ac.uk>
16 Signed-off-by: Andy Green <andy@openmoko.com>
18 arch/arm/mach-s3c2440/mach-gta02.c | 4 +++-
19 drivers/mfd/glamo/glamo-mci.c | 3 ++-
20 2 files changed, 5 insertions(+), 2 deletions(-)
22 diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
23 index 435378a..467c417 100644
24 --- a/arch/arm/mach-s3c2440/mach-gta02.c
25 +++ b/arch/arm/mach-s3c2440/mach-gta02.c
26 @@ -1417,8 +1417,10 @@ static int gta02_glamo_mci_all_dependencies_resumed(struct platform_device *dev)
28 static void gta02_glamo_mci_suspending(struct platform_device *dev)
30 + int glamo_mci_resume(struct platform_device *dev);
32 #if defined(CONFIG_MFD_GLAMO_MCI) && defined(CONFIG_PM)
33 - resume_dep_glamo_mci_pcf.callback = (void *)dev->dev.driver->resume;
34 + resume_dep_glamo_mci_pcf.callback = (void (*)(void *))glamo_mci_resume;
35 resume_dep_glamo_mci_pcf.context = (void *)dev;
36 pcf50633_register_resume_dependency(pcf50633_global,
37 &resume_dep_glamo_mci_pcf);
38 diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c
39 index d5099a0..fb6224d 100644
40 --- a/drivers/mfd/glamo/glamo-mci.c
41 +++ b/drivers/mfd/glamo/glamo-mci.c
42 @@ -1006,7 +1006,7 @@ static int glamo_mci_suspend(struct platform_device *dev, pm_message_t state)
46 -static int glamo_mci_resume(struct platform_device *dev)
47 +int glamo_mci_resume(struct platform_device *dev)
49 struct mmc_host *mmc = platform_get_drvdata(dev);
50 struct glamo_mci_host *host = mmc_priv(mmc);
51 @@ -1025,6 +1025,7 @@ static int glamo_mci_resume(struct platform_device *dev)
55 +EXPORT_SYMBOL_GPL(glamo_mci_resume);
58 #define glamo_mci_suspend NULL