HTC Dream compile fixes (was Re: HTC Dream aka. t-mobile g1 support)

Pavel Machek
2009-06-12T20:47:56Z

Fix compilation of pwrsink with CONFIG_WAKELOCK disabled.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff --git a/arch/arm/mach-msm/htc_pwrsink.c b/arch/arm/mach-msm/htc_pwrsink.c
index 3105a7c..3d3c55c 100644
--- a/arch/arm/mach-msm/htc_pwrsink.c
+++ b/arch/arm/mach-msm/htc_pwrsink.c
@@ -229,11 +229,13 @@ void htc_pwrsink_resume_late(struct early_suspend *h)
htc_pwrsink_set(PWRSINK_SYSTEM_LOAD, 38);
}

+#ifdef CONFIG_WAKELOCK
struct early_suspend htc_pwrsink_early_suspend = {
.level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1,
.suspend = htc_pwrsink_suspend_early,
.resume = htc_pwrsink_resume_late,
};
+#endif

static int __init htc_pwrsink_probe(struct platform_device *pdev)
{
@@ -252,10 +254,12 @@ static int __init htc_pwrsink_probe(struct platform_device *pdev)

initialized = 1;

+#ifdef CONFIG_WAKELOCK
if (pdata->suspend_early)
htc_pwrsink_early_suspend.suspend = pdata->suspend_early;
if (pdata->resume_late)
htc_pwrsink_early_suspend.resume = pdata->resume_late;
+#endif
register_early_suspend(&htc_pwrsink_early_suspend);

return 0;

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html