diff options
Diffstat (limited to 'drivers/platform/x86/dell-laptop.c')
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index ef614979afe9..46435ac4684f 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -559,10 +559,14 @@ static int __init dell_init(void) | |||
559 | release_buffer(); | 559 | release_buffer(); |
560 | 560 | ||
561 | if (max_intensity) { | 561 | if (max_intensity) { |
562 | dell_backlight_device = backlight_device_register( | 562 | struct backlight_properties props; |
563 | "dell_backlight", | 563 | memset(&props, 0, sizeof(struct backlight_properties)); |
564 | &platform_device->dev, NULL, | 564 | props.max_brightness = max_intensity; |
565 | &dell_ops); | 565 | dell_backlight_device = backlight_device_register("dell_backlight", |
566 | &platform_device->dev, | ||
567 | NULL, | ||
568 | &dell_ops, | ||
569 | &props); | ||
566 | 570 | ||
567 | if (IS_ERR(dell_backlight_device)) { | 571 | if (IS_ERR(dell_backlight_device)) { |
568 | ret = PTR_ERR(dell_backlight_device); | 572 | ret = PTR_ERR(dell_backlight_device); |
@@ -570,7 +574,6 @@ static int __init dell_init(void) | |||
570 | goto fail_backlight; | 574 | goto fail_backlight; |
571 | } | 575 | } |
572 | 576 | ||
573 | dell_backlight_device->props.max_brightness = max_intensity; | ||
574 | dell_backlight_device->props.brightness = | 577 | dell_backlight_device->props.brightness = |
575 | dell_get_intensity(dell_backlight_device); | 578 | dell_get_intensity(dell_backlight_device); |
576 | backlight_update_status(dell_backlight_device); | 579 | backlight_update_status(dell_backlight_device); |