diff options
Diffstat (limited to 'drivers/platform/x86/fujitsu-laptop.c')
-rw-r--r-- | drivers/platform/x86/fujitsu-laptop.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 5f3320d468f6..c1074b32490e 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
@@ -1126,16 +1126,20 @@ static int __init fujitsu_init(void) | |||
1126 | /* Register backlight stuff */ | 1126 | /* Register backlight stuff */ |
1127 | 1127 | ||
1128 | if (!acpi_video_backlight_support()) { | 1128 | if (!acpi_video_backlight_support()) { |
1129 | fujitsu->bl_device = | 1129 | struct backlight_properties props; |
1130 | backlight_device_register("fujitsu-laptop", NULL, NULL, | 1130 | |
1131 | &fujitsubl_ops); | 1131 | memset(&props, 0, sizeof(struct backlight_properties)); |
1132 | max_brightness = fujitsu->max_brightness; | ||
1133 | props.max_brightness = max_brightness - 1; | ||
1134 | fujitsu->bl_device = backlight_device_register("fujitsu-laptop", | ||
1135 | NULL, NULL, | ||
1136 | &fujitsubl_ops, | ||
1137 | &props); | ||
1132 | if (IS_ERR(fujitsu->bl_device)) { | 1138 | if (IS_ERR(fujitsu->bl_device)) { |
1133 | ret = PTR_ERR(fujitsu->bl_device); | 1139 | ret = PTR_ERR(fujitsu->bl_device); |
1134 | fujitsu->bl_device = NULL; | 1140 | fujitsu->bl_device = NULL; |
1135 | goto fail_sysfs_group; | 1141 | goto fail_sysfs_group; |
1136 | } | 1142 | } |
1137 | max_brightness = fujitsu->max_brightness; | ||
1138 | fujitsu->bl_device->props.max_brightness = max_brightness - 1; | ||
1139 | fujitsu->bl_device->props.brightness = fujitsu->brightness_level; | 1143 | fujitsu->bl_device->props.brightness = fujitsu->brightness_level; |
1140 | } | 1144 | } |
1141 | 1145 | ||