mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-09 16:12:21 +00:00
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>
This commit is contained in:
parent
fa9133c24c
commit
655bfd7aeb
12 changed files with 132 additions and 152 deletions
|
@ -62,8 +62,8 @@ struct lcd_device {
|
|||
struct mutex update_lock;
|
||||
/* The framebuffer notifier block */
|
||||
struct notifier_block fb_notif;
|
||||
/* The class device structure */
|
||||
struct class_device class_dev;
|
||||
|
||||
struct device dev;
|
||||
};
|
||||
|
||||
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)
|
|||
}
|
||||
|
||||
extern struct lcd_device *lcd_device_register(const char *name,
|
||||
void *devdata, struct lcd_ops *ops);
|
||||
struct device *parent, void *devdata, struct lcd_ops *ops);
|
||||
extern void lcd_device_unregister(struct lcd_device *ld);
|
||||
|
||||
#define to_lcd_device(obj) container_of(obj, struct lcd_device, class_dev)
|
||||
#define to_lcd_device(obj) container_of(obj, struct lcd_device, dev)
|
||||
|
||||
static inline void * lcd_get_data(struct lcd_device *ld_dev)
|
||||
{
|
||||
return dev_get_drvdata(&ld_dev->dev);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue