diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2016-03-30 22:03:25 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-05-17 14:44:58 +0200 |
commit | 7f044b09b68d36811518c55f736a20648e8ed6e2 (patch) | |
tree | 78040e859d1a61bdda2c2ea356ae5049361039ac | |
parent | 3587c260906259632df07652743269627f408d85 (diff) | |
download | blackbird-op-linux-7f044b09b68d36811518c55f736a20648e8ed6e2.tar.gz blackbird-op-linux-7f044b09b68d36811518c55f736a20648e8ed6e2.zip |
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>
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 64f9e1b8655f..a33a290fc956 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -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); |