9
0
Fork 0

video/backlight-pwm: fix the value of 'brightness_max'.

The field pwm_backlight->backlight.brightness_max should be the maximum
allowed brightness value for the backlight, not the max index of the
array 'pwm_backlight->levels[]'.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
iw3gtf@arcor.de 2016-07-14 16:17:16 +02:00 committed by Sascha Hauer
parent c27b1a93ce
commit 87c6a88f2a
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ static int pwm_backlight_parse_dt(struct device_d *dev,
return ret;
pwm_backlight->backlight.brightness_default = value;
pwm_backlight->backlight.brightness_max--;
pwm_backlight->backlight.brightness_max = pwm_backlight->scale;
}
pwm_backlight->enable_gpio = of_get_named_gpio_flags(node, "enable-gpios", 0, &flags);