diff options
Diffstat (limited to 'drivers/platform/x86/eeepc-laptop.c')
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 9a844caa3756..3fdf21e0052e 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -1131,18 +1131,20 @@ static int eeepc_backlight_notify(struct eeepc_laptop *eeepc) | |||
1131 | 1131 | ||
1132 | static int eeepc_backlight_init(struct eeepc_laptop *eeepc) | 1132 | static int eeepc_backlight_init(struct eeepc_laptop *eeepc) |
1133 | { | 1133 | { |
1134 | struct backlight_properties props; | ||
1134 | struct backlight_device *bd; | 1135 | struct backlight_device *bd; |
1135 | 1136 | ||
1137 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
1138 | props.max_brightness = 15; | ||
1136 | bd = backlight_device_register(EEEPC_LAPTOP_FILE, | 1139 | bd = backlight_device_register(EEEPC_LAPTOP_FILE, |
1137 | &eeepc->platform_device->dev, | 1140 | &eeepc->platform_device->dev, eeepc, |
1138 | eeepc, &eeepcbl_ops); | 1141 | &eeepcbl_ops, &props); |
1139 | if (IS_ERR(bd)) { | 1142 | if (IS_ERR(bd)) { |
1140 | pr_err("Could not register eeepc backlight device\n"); | 1143 | pr_err("Could not register eeepc backlight device\n"); |
1141 | eeepc->backlight_device = NULL; | 1144 | eeepc->backlight_device = NULL; |
1142 | return PTR_ERR(bd); | 1145 | return PTR_ERR(bd); |
1143 | } | 1146 | } |
1144 | eeepc->backlight_device = bd; | 1147 | eeepc->backlight_device = bd; |
1145 | bd->props.max_brightness = 15; | ||
1146 | bd->props.brightness = read_brightness(bd); | 1148 | bd->props.brightness = read_brightness(bd); |
1147 | bd->props.power = FB_BLANK_UNBLANK; | 1149 | bd->props.power = FB_BLANK_UNBLANK; |
1148 | backlight_update_status(bd); | 1150 | backlight_update_status(bd); |