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: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
Boris BREZILLON 2016-03-30 22:03:25 +02:00 committed by Thierry Reding
parent 3587c26090
commit 7f044b09b6
1 changed files with 1 additions and 3 deletions

View File

@ -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);