backlight: Rework backlight/fb interaction simplifying, lots

fb_info->bl_mutex is badly thought out and the backlight class doesn't
need it if the framebuffer/backlight register/unregister order is
consistent, particularly after the backlight locking fixes.

Fix the drivers to use the order:

backlight_device_register()
register_framebuffer()
unregister_framebuffer()
backlight_device_unregister()

and turn bl_mutex into a lock for the bl_curve data only.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
This commit is contained in:
Richard Purdie
2007-02-10 14:10:33 +00:00
parent b5c6916b31
commit 37ce69a57f
9 changed files with 68 additions and 184 deletions

View File

@@ -1350,9 +1350,10 @@ static void __devexit nvidiafb_remove(struct pci_dev *pd)
NVTRACE_ENTER();
unregister_framebuffer(info);
nvidia_bl_exit(par);
unregister_framebuffer(info);
#ifdef CONFIG_MTRR
if (par->mtrr.vram_valid)
mtrr_del(par->mtrr.vram, info->fix.smem_start,