Commit ed97604e authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Bryan Wu

leds: leds-pwm: drop one pwm_get_period() call

pwm_get_period() is called twice in case the child parameter is set. I
assume retrieving this parameter once is enough therefore this patch
removes the conditial invocation of pwm_get_period().
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent c517d838
......@@ -121,9 +121,6 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
return ret;
}
if (child)
led_data->period = pwm_get_period(led_data->pwm);
led_data->can_sleep = pwm_can_sleep(led_data->pwm);
if (led_data->can_sleep)
INIT_WORK(&led_data->work, led_pwm_work);
......
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