X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Flcd.h;h=173febac6656c20eaec69a8a03dc5fe53d9d9759;hb=bdd314616f7218e325aa9637a46159ecba44cfeb;hp=598793c0745b3c97ec593f1329b351b5743c3b1d;hpb=e0cc09e295f346b7921e921f385fe5213472316a;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 598793c0745..173febac665 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -47,7 +47,7 @@ struct lcd_ops { int (*set_contrast)(struct lcd_device *, int contrast); /* Check if given framebuffer device is the one LCD is bound to; return 0 if not, !=0 if it is. If NULL, lcd always matches the fb. */ - int (*check_fb)(struct fb_info *); + int (*check_fb)(struct lcd_device *, struct fb_info *); }; struct lcd_device { @@ -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