diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2015-02-06 17:04:00 +0100 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2015-02-24 20:42:18 +0100 |
commit | ed97604e362c67fb5410ce2cbe8769b818cdc0af (patch) | |
tree | d7ce26a1fa845c1c1f52e844f2d695fd403a85ec /drivers/leds | |
parent | Linux 4.0-rc1 (diff) | |
download | linux-ed97604e362c67fb5410ce2cbe8769b818cdc0af.tar.xz linux-ed97604e362c67fb5410ce2cbe8769b818cdc0af.zip |
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>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-pwm.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index f668500a2157..1d07e3e83d29 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -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); |