diff options
Diffstat (limited to 'drivers/video/backlight/backlight.c')
-rw-r--r-- | drivers/video/backlight/backlight.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index db8c191b1201..9601bfe309ac 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c | |||
@@ -216,8 +216,10 @@ static const struct class_device_attribute bl_class_device_attributes[] = { | |||
216 | * Creates and registers new backlight class_device. Returns either an | 216 | * Creates and registers new backlight class_device. Returns either an |
217 | * ERR_PTR() or a pointer to the newly allocated device. | 217 | * ERR_PTR() or a pointer to the newly allocated device. |
218 | */ | 218 | */ |
219 | struct backlight_device *backlight_device_register(const char *name, void *devdata, | 219 | struct backlight_device *backlight_device_register(const char *name, |
220 | struct backlight_properties *bp) | 220 | struct device *dev, |
221 | void *devdata, | ||
222 | struct backlight_properties *bp) | ||
221 | { | 223 | { |
222 | int i, rc; | 224 | int i, rc; |
223 | struct backlight_device *new_bd; | 225 | struct backlight_device *new_bd; |
@@ -232,6 +234,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda | |||
232 | new_bd->props = bp; | 234 | new_bd->props = bp; |
233 | memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev)); | 235 | memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev)); |
234 | new_bd->class_dev.class = &backlight_class; | 236 | new_bd->class_dev.class = &backlight_class; |
237 | new_bd->class_dev.dev = dev; | ||
235 | strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN); | 238 | strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN); |
236 | class_set_devdata(&new_bd->class_dev, devdata); | 239 | class_set_devdata(&new_bd->class_dev, devdata); |
237 | 240 | ||