diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-07-09 07:17:24 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-07-15 20:20:23 -0400 |
commit | 655bfd7aebb12481ab9275284d9500bee5ba3e70 (patch) | |
tree | 54503eb59a03d94db77edca3388d36e3e5315dd8 /include/linux/lcd.h | |
parent | fa9133c24c4115523c1381b67fdd74fd864ac0ea (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/lcd.h')
-rw-r--r-- | include/linux/lcd.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 598793c0745..1d379787f2e 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -62,8 +62,8 @@ struct lcd_device { | |||
62 | struct mutex update_lock; | 62 | struct mutex update_lock; |
63 | /* The framebuffer notifier block */ | 63 | /* The framebuffer notifier block */ |
64 | struct notifier_block fb_notif; | 64 | struct notifier_block fb_notif; |
65 | /* The class device structure */ | 65 | |
66 | struct class_device class_dev; | 66 | struct device dev; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static inline void lcd_set_power(struct lcd_device *ld, int power) | 69 | static inline void lcd_set_power(struct lcd_device *ld, int power) |
@@ -75,9 +75,15 @@ static inline void lcd_set_power(struct lcd_device *ld, int power) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | extern struct lcd_device *lcd_device_register(const char *name, | 77 | extern struct lcd_device *lcd_device_register(const char *name, |
78 | void *devdata, struct lcd_ops *ops); | 78 | struct device *parent, void *devdata, struct lcd_ops *ops); |
79 | extern void lcd_device_unregister(struct lcd_device *ld); | 79 | extern void lcd_device_unregister(struct lcd_device *ld); |
80 | 80 | ||
81 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, class_dev) | 81 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, dev) |
82 | |||
83 | static inline void * lcd_get_data(struct lcd_device *ld_dev) | ||
84 | { | ||
85 | return dev_get_drvdata(&ld_dev->dev); | ||
86 | } | ||
87 | |||
82 | 88 | ||
83 | #endif | 89 | #endif |