On Fri, Feb 6, 2015 at 8:04 AM, Sebastian Andrzej Siewior
<[email protected]> wrote:
> 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().
>

Good catch, I will merge this patch
-Bryan

> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
> ---
>  drivers/leds/leds-pwm.c | 3 ---
>  1 file changed, 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
> @@ -119,13 +119,10 @@ static int led_pwm_add(struct device *dev, struct 
> led_pwm_priv *priv,
>                 dev_err(dev, "unable to request PWM for %s: %d\n",
>                         led->name, ret);
>                 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);
>
>         led_data->period = pwm_get_period(led_data->pwm);
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to