From: Boris BREZILLON Date: Wed, 30 Mar 2016 20:03:25 +0000 (+0200) Subject: UPSTREAM: backlight: pwm_bl: Remove useless call to pwm_set_period() X-Git-Tag: firefly_0821_release~448 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a0a5f14bc8620564b428025f7ab812d2c5d9a87e;p=firefly-linux-kernel-4.4.55.git UPSTREAM: 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 Acked-by: Lee Jones Signed-off-by: Thierry Reding (cherry picked from commit 7f044b09b68d36811518c55f736a20648e8ed6e2) Change-Id: I6eecc6cd8e9dbe5929bdc016433772a721711928 Signed-off-by: David Wu --- 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);