From: David Woodhouse Date: Fri, 29 Sep 2006 17:01:11 +0000 (+0000) Subject: [PATCH] Fix uninitialised spinlock in via-pmu-backlight code. X-Git-Tag: v2.6.18.2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d8565debdd12b99c133ff9553fceb6bc0749051;p=thirdparty%2Fkernel%2Fstable.git [PATCH] Fix uninitialised spinlock in via-pmu-backlight code. The uninitialised pmu_backlight_lock causes the current Fedora test kernel (which has spinlock debugging enabled) to panic on suspend. This is suboptimal, so I fixed it. Signed-off-by: David Woodhouse Acked-by: Benjamin Herrenschmidt Acked-by: Michael Hanselmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman Signed-off-by: Chris Wright --- diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c index a82f313d9dc97..6c29fe727c0f4 100644 --- a/drivers/macintosh/via-pmu-backlight.c +++ b/drivers/macintosh/via-pmu-backlight.c @@ -16,7 +16,7 @@ #define MAX_PMU_LEVEL 0xFF static struct backlight_properties pmu_backlight_data; -static spinlock_t pmu_backlight_lock; +static DEFINE_SPINLOCK(pmu_backlight_lock); static int sleeping; static u8 bl_curve[FB_BACKLIGHT_LEVELS];