diff options
Diffstat (limited to 'include/linux/backlight.h')
-rw-r--r-- | include/linux/backlight.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 1023ba0d6e55..1ee9488ca2e4 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -69,8 +69,8 @@ struct backlight_device { | |||
69 | 69 | ||
70 | /* The framebuffer notifier block */ | 70 | /* The framebuffer notifier block */ |
71 | struct notifier_block fb_notif; | 71 | struct notifier_block fb_notif; |
72 | /* The class device structure */ | 72 | |
73 | struct class_device class_dev; | 73 | struct device dev; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static inline void backlight_update_status(struct backlight_device *bd) | 76 | static inline void backlight_update_status(struct backlight_device *bd) |
@@ -85,6 +85,20 @@ extern struct backlight_device *backlight_device_register(const char *name, | |||
85 | struct device *dev, void *devdata, struct backlight_ops *ops); | 85 | struct device *dev, void *devdata, struct backlight_ops *ops); |
86 | extern void backlight_device_unregister(struct backlight_device *bd); | 86 | extern void backlight_device_unregister(struct backlight_device *bd); |
87 | 87 | ||
88 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) | 88 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) |
89 | |||
90 | static inline void * bl_get_data(struct backlight_device *bl_dev) | ||
91 | { | ||
92 | return dev_get_drvdata(&bl_dev->dev); | ||
93 | } | ||
94 | |||
95 | struct generic_bl_info { | ||
96 | const char *name; | ||
97 | int max_intensity; | ||
98 | int default_intensity; | ||
99 | int limit_mask; | ||
100 | void (*set_bl_intensity)(int intensity); | ||
101 | void (*kick_battery)(void); | ||
102 | }; | ||
89 | 103 | ||
90 | #endif | 104 | #endif |