aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/backlight.h
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-07-09 07:17:24 -0400
committerRichard Purdie <rpurdie@rpsys.net>2007-07-15 20:20:23 -0400
commit655bfd7aebb12481ab9275284d9500bee5ba3e70 (patch)
tree54503eb59a03d94db77edca3388d36e3e5315dd8 /include/linux/backlight.h
parentfa9133c24c4115523c1381b67fdd74fd864ac0ea (diff)
backlight: Convert from struct class_device to struct device
Convert the backlight and LCD classes from struct class_device to struct device since class_device is scheduled for removal. One nasty API break is the backlight power attribute has had to be renamed to bl_power and the LCD power attribute has had to be renamed to lcd_power since the original names clash with the core. I can't see a way around this. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/backlight.h')
-rw-r--r--include/linux/backlight.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 1023ba0d6e5..c897c7b0385 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
76static inline void backlight_update_status(struct backlight_device *bd) 76static inline void backlight_update_status(struct backlight_device *bd)
@@ -85,6 +85,11 @@ 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);
86extern void backlight_device_unregister(struct backlight_device *bd); 86extern 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
90static inline void * bl_get_data(struct backlight_device *bl_dev)
91{
92 return dev_get_drvdata(&bl_dev->dev);
93}
89 94
90#endif 95#endif