[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 <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Benjamin Herrenschmidt 2006-08-31 21:27:54 -07:00 • committed by Linus Torvalds
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)