aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-02-10 09:10:33 -0500
committerRichard Purdie <rpurdie@rpsys.net>2007-02-20 03:38:46 -0500
commit37ce69a57ff217a4ca0871e9ee5aa58c052b7d86 (patch)
tree21cdbb8c988eed585437bb502ca15c2998ea7fbc /include
parentb5c6916b3118d4301dc2f8cf8d33f13e5324a3a5 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fb.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index bf7158b59b25..be913ec87169 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -769,16 +769,13 @@ struct fb_info {
769 struct fb_videomode *mode; /* current mode */ 769 struct fb_videomode *mode; /* current mode */
770 770
771#ifdef CONFIG_FB_BACKLIGHT 771#ifdef CONFIG_FB_BACKLIGHT
772 /* Lock ordering:
773 * bl_mutex (protects bl_dev and bl_curve)
774 * bl_dev->sem (backlight class)
775 */
776 struct mutex bl_mutex;
777
778 /* assigned backlight device */ 772 /* assigned backlight device */
773 /* set before framebuffer registration,
774 remove after unregister */
779 struct backlight_device *bl_dev; 775 struct backlight_device *bl_dev;
780 776
781 /* Backlight level curve */ 777 /* Backlight level curve */
778 struct mutex bl_curve_mutex;
782 u8 bl_curve[FB_BACKLIGHT_LEVELS]; 779 u8 bl_curve[FB_BACKLIGHT_LEVELS];
783#endif 780#endif
784 781