All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Johan Hovold <jhovold@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
	Johannes Berg <johannes.berg@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling
Date: Mon, 5 Sep 2011 19:55:43 +0200	[thread overview]
Message-ID: <201109051955.43420.f.fainelli@gmail.com> (raw)
In-Reply-To: <1315236783-513-1-git-send-email-jhovold@gmail.com>

On Monday 05 September 2011 17:33:03 Johan Hovold wrote:
> Fix regression introduced by commit
> 5ada28bf76752e33dce3d807bf0dfbe6d1b943ad (led-class: always implement
> blinking) which broke sysfs delay handling by not storing the updated
> value. Consequently it was only possible to set one of the delays
> through the sysfs interface as the other delay was automatically
> restored to it's default value. Reading the parameters always gave the
> defaults.
> 
> Cc: stable@kernel.org
> Signed-off-by: Johan Hovold <jhovold@gmail.com>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/leds/ledtrig-timer.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
> index d87c9d0..328c64c 100644
> --- a/drivers/leds/ledtrig-timer.c
> +++ b/drivers/leds/ledtrig-timer.c
> @@ -41,6 +41,7 @@ static ssize_t led_delay_on_store(struct device *dev,
> 
>  	if (count == size) {
>  		led_blink_set(led_cdev, &state, &led_cdev->blink_delay_off);
> +		led_cdev->blink_delay_on = state;
>  		ret = count;
>  	}
> 
> @@ -69,6 +70,7 @@ static ssize_t led_delay_off_store(struct device *dev,
> 
>  	if (count == size) {
>  		led_blink_set(led_cdev, &led_cdev->blink_delay_on, &state);
> +		led_cdev->blink_delay_off = state;
>  		ret = count;
>  	}

-- 
Florian

  reply	other threads:[~2011-09-05 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05 15:33 [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling Johan Hovold
2011-09-05 17:55 ` Florian Fainelli [this message]
2011-09-05 19:54   ` Richard Purdie
2011-09-06 23:03     ` Andrew Morton
2011-09-07 13:47       ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201109051955.43420.f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jhovold@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.