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

From: Pavel Machek
Date: Fri Jun 12 2009 - 16:48:00 EST



Fix compilation of pwrsink with CONFIG_WAKELOCK disabled.

Signed-off-by: Pavel Machek <pavel@xxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/