|
@@ -190,8 +190,10 @@ static int fb_notifier_callback(struct notifier_block *self,
|
|
* Creates and registers new backlight class_device. Returns either an
|
|
* Creates and registers new backlight class_device. Returns either an
|
|
* ERR_PTR() or a pointer to the newly allocated device.
|
|
* ERR_PTR() or a pointer to the newly allocated device.
|
|
*/
|
|
*/
|
|
-struct backlight_device *backlight_device_register(const char *name, void *devdata,
|
|
|
|
- struct backlight_properties *bp)
|
|
|
|
|
|
+struct backlight_device *backlight_device_register(const char *name,
|
|
|
|
+ struct device *dev,
|
|
|
|
+ void *devdata,
|
|
|
|
+ struct backlight_properties *bp)
|
|
{
|
|
{
|
|
int i, rc;
|
|
int i, rc;
|
|
struct backlight_device *new_bd;
|
|
struct backlight_device *new_bd;
|
|
@@ -206,6 +208,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
|
|
new_bd->props = bp;
|
|
new_bd->props = bp;
|
|
memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev));
|
|
memset(&new_bd->class_dev, 0, sizeof(new_bd->class_dev));
|
|
new_bd->class_dev.class = &backlight_class;
|
|
new_bd->class_dev.class = &backlight_class;
|
|
|
|
+ new_bd->class_dev.dev = dev;
|
|
strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN);
|
|
strlcpy(new_bd->class_dev.class_id, name, KOBJ_NAME_LEN);
|
|
class_set_devdata(&new_bd->class_dev, devdata);
|
|
class_set_devdata(&new_bd->class_dev, devdata);
|
|
|
|
|