[PATCH] backlight last round of fixes

Fix some more problems (inverted use of semaphores in some places).  He
also moved my checks into within the protected section which is better.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Benjamin Herrenschmidt
2006-08-31 21:27:54 -07:00
committed by Linus Torvalds
parent 4cfb04a9d3
commit a930363881
6 changed files with 44 additions and 39 deletions

View File

@@ -167,11 +167,11 @@ void __init pmu_backlight_init()
pmu_backlight_data.max_brightness / 15);
}
up(&bd->sem);
down(&bd->sem);
bd->props->brightness = level;
bd->props->power = FB_BLANK_UNBLANK;
bd->props->update_status(bd);
down(&bd->sem);
up(&bd->sem);
mutex_lock(&pmac_backlight_mutex);
if (!pmac_backlight)