diff options
Diffstat (limited to 'drivers/video/backlight/ams369fg06.c')
-rw-r--r-- | drivers/video/backlight/ams369fg06.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c index 2c314303f915..9f0a491e2a05 100644 --- a/drivers/video/backlight/ams369fg06.c +++ b/drivers/video/backlight/ams369fg06.c | |||
@@ -479,6 +479,7 @@ static int __devinit ams369fg06_probe(struct spi_device *spi) | |||
479 | struct ams369fg06 *lcd = NULL; | 479 | struct ams369fg06 *lcd = NULL; |
480 | struct lcd_device *ld = NULL; | 480 | struct lcd_device *ld = NULL; |
481 | struct backlight_device *bd = NULL; | 481 | struct backlight_device *bd = NULL; |
482 | struct backlight_properties props; | ||
482 | 483 | ||
483 | lcd = kzalloc(sizeof(struct ams369fg06), GFP_KERNEL); | 484 | lcd = kzalloc(sizeof(struct ams369fg06), GFP_KERNEL); |
484 | if (!lcd) | 485 | if (!lcd) |
@@ -511,16 +512,18 @@ static int __devinit ams369fg06_probe(struct spi_device *spi) | |||
511 | 512 | ||
512 | lcd->ld = ld; | 513 | lcd->ld = ld; |
513 | 514 | ||
515 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
516 | props.type = BACKLIGHT_RAW; | ||
517 | props.max_brightness = MAX_BRIGHTNESS; | ||
518 | |||
514 | bd = backlight_device_register("ams369fg06-bl", &spi->dev, lcd, | 519 | bd = backlight_device_register("ams369fg06-bl", &spi->dev, lcd, |
515 | &ams369fg06_backlight_ops, NULL); | 520 | &ams369fg06_backlight_ops, &props); |
516 | if (IS_ERR(bd)) { | 521 | if (IS_ERR(bd)) { |
517 | ret = PTR_ERR(bd); | 522 | ret = PTR_ERR(bd); |
518 | goto out_lcd_unregister; | 523 | goto out_lcd_unregister; |
519 | } | 524 | } |
520 | 525 | ||
521 | bd->props.max_brightness = MAX_BRIGHTNESS; | ||
522 | bd->props.brightness = DEFAULT_BRIGHTNESS; | 526 | bd->props.brightness = DEFAULT_BRIGHTNESS; |
523 | bd->props.type = BACKLIGHT_RAW; | ||
524 | lcd->bd = bd; | 527 | lcd->bd = bd; |
525 | 528 | ||
526 | if (!lcd->lcd_pd->lcd_enabled) { | 529 | if (!lcd->lcd_pd->lcd_enabled) { |