diff options
Diffstat (limited to 'drivers/misc/msi-laptop.c')
-rw-r--r-- | drivers/misc/msi-laptop.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/misc/msi-laptop.c b/drivers/misc/msi-laptop.c index dd4d92e031b7..68c4b58525ba 100644 --- a/drivers/misc/msi-laptop.c +++ b/drivers/misc/msi-laptop.c | |||
@@ -157,13 +157,12 @@ static int bl_get_brightness(struct backlight_device *b) | |||
157 | 157 | ||
158 | static int bl_update_status(struct backlight_device *b) | 158 | static int bl_update_status(struct backlight_device *b) |
159 | { | 159 | { |
160 | return set_lcd_level(b->props->brightness); | 160 | return set_lcd_level(b->props.brightness); |
161 | } | 161 | } |
162 | 162 | ||
163 | static struct backlight_properties msibl_props = { | 163 | static struct backlight_ops msibl_ops = { |
164 | .get_brightness = bl_get_brightness, | 164 | .get_brightness = bl_get_brightness, |
165 | .update_status = bl_update_status, | 165 | .update_status = bl_update_status, |
166 | .max_brightness = MSI_LCD_LEVEL_MAX-1, | ||
167 | }; | 166 | }; |
168 | 167 | ||
169 | static struct backlight_device *msibl_device; | 168 | static struct backlight_device *msibl_device; |
@@ -317,10 +316,12 @@ static int __init msi_init(void) | |||
317 | /* Register backlight stuff */ | 316 | /* Register backlight stuff */ |
318 | 317 | ||
319 | msibl_device = backlight_device_register("msi-laptop-bl", NULL, NULL, | 318 | msibl_device = backlight_device_register("msi-laptop-bl", NULL, NULL, |
320 | &msibl_props); | 319 | &msibl_ops); |
321 | if (IS_ERR(msibl_device)) | 320 | if (IS_ERR(msibl_device)) |
322 | return PTR_ERR(msibl_device); | 321 | return PTR_ERR(msibl_device); |
323 | 322 | ||
323 | msibl_device->props.max_brightness = MSI_LCD_LEVEL_MAX-1, | ||
324 | |||
324 | ret = platform_driver_register(&msipf_driver); | 325 | ret = platform_driver_register(&msipf_driver); |
325 | if (ret) | 326 | if (ret) |
326 | goto fail_backlight; | 327 | goto fail_backlight; |