diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 27597c5..1a18cdb 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -190,7 +190,7 @@ static int fb_notifier_callback(struct n * Creates and registers new backlight class_device. Returns either an * ERR_PTR() or a pointer to the newly allocated device. */ -struct backlight_device *backlight_device_register(const char *name, void *devdata, +struct backlight_device *backlight_device_register(const char *name,struct device *dev, void *devdata, struct backlight_properties *bp) { int i, rc; @@ -206,6 +206,7 @@ struct backlight_device *backlight_devic new_bd->props = bp; memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev)); new_bd->class_dev.class = &backlight_class; + new_bd->class_dev.dev = dev; strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN); class_set_devdata(&new_bd->class_dev, devdata); diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 75e91f5..de8e056 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -54,7 +54,7 @@ struct backlight_device { }; extern struct backlight_device *backlight_device_register(const char *name, - void *devdata, struct backlight_properties *bp); + struct device *dev, void *devdata, struct backlight_properties *bp); extern void backlight_device_unregister(struct backlight_device *bd); #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev)