diff options
Diffstat (limited to 'drivers/video/backlight/corgi_lcd.c')
-rw-r--r-- | drivers/video/backlight/corgi_lcd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index b4bcf8043797..73bdd8454c94 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
@@ -533,6 +533,7 @@ err_free_backlight_on: | |||
533 | 533 | ||
534 | static int __devinit corgi_lcd_probe(struct spi_device *spi) | 534 | static int __devinit corgi_lcd_probe(struct spi_device *spi) |
535 | { | 535 | { |
536 | struct backlight_properties props; | ||
536 | struct corgi_lcd_platform_data *pdata = spi->dev.platform_data; | 537 | struct corgi_lcd_platform_data *pdata = spi->dev.platform_data; |
537 | struct corgi_lcd *lcd; | 538 | struct corgi_lcd *lcd; |
538 | int ret = 0; | 539 | int ret = 0; |
@@ -559,13 +560,14 @@ static int __devinit corgi_lcd_probe(struct spi_device *spi) | |||
559 | lcd->power = FB_BLANK_POWERDOWN; | 560 | lcd->power = FB_BLANK_POWERDOWN; |
560 | lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA; | 561 | lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA; |
561 | 562 | ||
562 | lcd->bl_dev = backlight_device_register("corgi_bl", &spi->dev, | 563 | memset(&props, 0, sizeof(struct backlight_properties)); |
563 | lcd, &corgi_bl_ops); | 564 | props.max_brightness = pdata->max_intensity; |
565 | lcd->bl_dev = backlight_device_register("corgi_bl", &spi->dev, lcd, | ||
566 | &corgi_bl_ops, &props); | ||
564 | if (IS_ERR(lcd->bl_dev)) { | 567 | if (IS_ERR(lcd->bl_dev)) { |
565 | ret = PTR_ERR(lcd->bl_dev); | 568 | ret = PTR_ERR(lcd->bl_dev); |
566 | goto err_unregister_lcd; | 569 | goto err_unregister_lcd; |
567 | } | 570 | } |
568 | lcd->bl_dev->props.max_brightness = pdata->max_intensity; | ||
569 | lcd->bl_dev->props.brightness = pdata->default_intensity; | 571 | lcd->bl_dev->props.brightness = pdata->default_intensity; |
570 | lcd->bl_dev->props.power = FB_BLANK_UNBLANK; | 572 | lcd->bl_dev->props.power = FB_BLANK_UNBLANK; |
571 | 573 | ||