浏览代码

[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@infradead.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Woodhouse 19 年之前
父节点
当前提交
4efd587bf9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/macintosh/via-pmu-backlight.c

+ 1 - 1
drivers/macintosh/via-pmu-backlight.c

@@ -16,7 +16,7 @@
 #define MAX_PMU_LEVEL 0xFF
 #define MAX_PMU_LEVEL 0xFF
 
 
 static struct backlight_properties pmu_backlight_data;
 static struct backlight_properties pmu_backlight_data;
-static spinlock_t pmu_backlight_lock;
+static DEFINE_SPINLOCK(pmu_backlight_lock);
 static int sleeping;
 static int sleeping;
 static u8 bl_curve[FB_BACKLIGHT_LEVELS];
 static u8 bl_curve[FB_BACKLIGHT_LEVELS];