Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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);