From 655bfd7aebb12481ab9275284d9500bee5ba3e70 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 9 Jul 2007 12:17:24 +0100 Subject: 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 Acked-by: Greg Kroah-Hartman --- include/linux/backlight.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/linux/backlight.h') diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 1023ba0d6e55..c897c7b03858 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -69,8 +69,8 @@ struct backlight_device { /* The framebuffer notifier block */ struct notifier_block fb_notif; - /* The class device structure */ - struct class_device class_dev; + + struct device dev; }; static inline void backlight_update_status(struct backlight_device *bd) @@ -85,6 +85,11 @@ extern struct backlight_device *backlight_device_register(const char *name, struct device *dev, void *devdata, struct backlight_ops *ops); extern void backlight_device_unregister(struct backlight_device *bd); -#define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) +#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) + +static inline void * bl_get_data(struct backlight_device *bl_dev) +{ + return dev_get_drvdata(&bl_dev->dev); +} #endif -- cgit v1.2.3-59-g8ed1b