backlight: pwm_bl: Remove useless call to pwm_set_period()
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Wed, 30 Mar 2016 20:03:25 +0000 (22:03 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 17 May 2016 12:44:58 +0000 (14:44 +0200)
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>
drivers/video/backlight/pwm_bl.c

index 64f9e1b8655f4b29f64f95c6cf9b3a0e9cc04c6d..a33a290fc9562fcea6317fef8fc9a83475d9e6a4 100644 (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);
 
This page took 0.027834 seconds and 5 git commands to generate.