From: David Woodhouse Date: Fri, 29 Sep 2006 08:58:37 +0000 (-0700) Subject: [PATCH] Fix uninitialised spinlock in via-pmu-backlight code. X-Git-Tag: v2.6.19-rc1~854 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4efd587bf9f9a97608b1fcecc78a4a046c37e9b1;p=linux-2.6 [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 --- diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c index a82f313d9d..6c29fe727c 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];