Commit 7f044b09 authored by Boris BREZILLON's avatar Boris BREZILLON Committed by Thierry Reding

backlight: pwm_bl: Remove useless call to pwm_set_period()

The PWM period will be set when calling pwm_config. Remove this useless
call to pwm_set_period(), which might mess up the internal PWM state.
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 3587c260
......@@ -313,10 +313,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
* via the PWM lookup table.
*/
pb->period = pwm_get_period(pb->pwm);
if (!pb->period && (data->pwm_period_ns > 0)) {
if (!pb->period && (data->pwm_period_ns > 0))
pb->period = data->pwm_period_ns;
pwm_set_period(pb->pwm, data->pwm_period_ns);
}
pb->lth_brightness = data->lth_brightness * (pb->period / pb->scale);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment