[PATCH 18/61] Fix uninitialised spinlock in via-pmu-backlight code.

From: Chris Wright
Date: Wed Nov 01 2006 - 00:54:12 EST


-stable review patch. If anyone has any objections, please let us know.
------------------

From: David Woodhouse <dwmw2@xxxxxxxxxxxxx>

[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 <dwmw2@xxxxxxxxxxxxx>
Acked-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Acked-by: Michael Hanselmann <linux-kernel@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>

---
drivers/macintosh/via-pmu-backlight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.18.1.orig/drivers/macintosh/via-pmu-backlight.c
+++ linux-2.6.18.1/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];


--
-
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/