aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/backlight.c
diff options
context:
space:
mode:
authorYu Luming <luming.yu@gmail.com>2006-12-19 15:56:15 -0500
committerLen Brown <len.brown@intel.com>2006-12-20 01:42:19 -0500
commit519ab5f2be65b72cf12ae99c89752bbe79b44df6 (patch)
tree6e404b214e426e6ccc08e414df405655fb2b404c /drivers/video/backlight/backlight.c
parentf4715189dfb1c381ad36b7e02e3716fb7a7f84db (diff)
ACPI: video: Add dev argument for backlight_device_register
This patch set adds generic abstract layer support for acpi video driver to have generic user interface to control backlight and output switch control by leveraging the existing backlight sysfs class driver, and by adding a new video output sysfs class driver. This patch: Add dev argument for backlight_device_register to link the class device to real device object. The platform specific driver should find a way to get the real device object for their video device. [akpm@osdl.org: build fix] [akpm@osdl.org: fix msi-laptop.c] Signed-off-by: Luming Yu <Luming.yu@intel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/video/backlight/backlight.c')
-rw-r--r--drivers/video/backlight/backlight.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 27597c576eff..1d97cdf6f382 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -190,8 +190,10 @@ static int fb_notifier_callback(struct notifier_block *self,
190 * Creates and registers new backlight class_device. Returns either an 190 * Creates and registers new backlight class_device. Returns either an
191 * ERR_PTR() or a pointer to the newly allocated device. 191 * ERR_PTR() or a pointer to the newly allocated device.
192 */ 192 */
193struct backlight_device *backlight_device_register(const char *name, void *devdata, 193struct backlight_device *backlight_device_register(const char *name,
194 struct backlight_properties *bp) 194 struct device *dev,
195 void *devdata,
196 struct backlight_properties *bp)
195{ 197{
196 int i, rc; 198 int i, rc;
197 struct backlight_device *new_bd; 199 struct backlight_device *new_bd;
@@ -206,6 +208,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
206 new_bd->props = bp; 208 new_bd->props = bp;
207 memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev)); 209 memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev));
208 new_bd->class_dev.class = &backlight_class; 210 new_bd->class_dev.class = &backlight_class;
211 new_bd->class_dev.dev = dev;
209 strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN); 212 strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN);
210 class_set_devdata(&new_bd->class_dev, devdata); 213 class_set_devdata(&new_bd->class_dev, devdata);
211 214