[PATCH 2/4] video/backlight-pwm: fix the value of 'brightness_max'.
iw3gtf at arcor.de
iw3gtf at arcor.de
Thu Jul 14 07:17:16 PDT 2016
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[]'.
---
drivers/video/backlight-pwm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight-pwm.c b/drivers/video/backlight-pwm.c
index 3024ec6..53cf4e9 100644
--- a/drivers/video/backlight-pwm.c
+++ b/drivers/video/backlight-pwm.c
@@ -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);
--
2.9.1
More information about the barebox
mailing list