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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
This commit is contained in:
Sebastian Andrzej Siewior 2015-02-06 08:04:00 -08:00 committed by Bryan Wu
parent c517d838eb
commit ed97604e36

View File

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