* [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling
@ 2011-09-05 15:33 Johan Hovold
2011-09-05 17:55 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2011-09-05 15:33 UTC (permalink / raw)
To: Richard Purdie
Cc: Johannes Berg, Andrew Morton, linux-kernel, Johan Hovold, stable
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>
---
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;
}
--
1.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling
2011-09-05 15:33 [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling Johan Hovold
@ 2011-09-05 17:55 ` Florian Fainelli
2011-09-05 19:54 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2011-09-05 17:55 UTC (permalink / raw)
To: Johan Hovold
Cc: Richard Purdie, Johannes Berg, Andrew Morton, linux-kernel,
stable
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling
2011-09-05 17:55 ` Florian Fainelli
@ 2011-09-05 19:54 ` Richard Purdie
2011-09-06 23:03 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2011-09-05 19:54 UTC (permalink / raw)
To: Florian Fainelli
Cc: Johan Hovold, Johannes Berg, Andrew Morton, linux-kernel, stable
On Mon, 2011-09-05 at 19:55 +0200, Florian Fainelli wrote:
> 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>
Acked-by: Richard Purdie <rchard.purdie@linuxfoundation.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;
> > }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling
2011-09-05 19:54 ` Richard Purdie
@ 2011-09-06 23:03 ` Andrew Morton
2011-09-07 13:47 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2011-09-06 23:03 UTC (permalink / raw)
To: Richard Purdie
Cc: Florian Fainelli, Johan Hovold, Johannes Berg, linux-kernel,
stable
On Mon, 05 Sep 2011 20:54:50 +0100
Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> Acked-by: Richard Purdie <rchard.purdie@linuxfoundation.org>
Y r mssng vwl.
Is richard.purdie@linuxfoundation.org now your preferred address? Will
rpurdie@rpsys.net cease to work?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling
2011-09-06 23:03 ` Andrew Morton
@ 2011-09-07 13:47 ` Richard Purdie
0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2011-09-07 13:47 UTC (permalink / raw)
To: Andrew Morton
Cc: Florian Fainelli, Johan Hovold, Johannes Berg, linux-kernel,
stable
On Tue, 2011-09-06 at 16:03 -0700, Andrew Morton wrote:
> On Mon, 05 Sep 2011 20:54:50 +0100
> Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
>
> > Acked-by: Richard Purdie <rchard.purdie@linuxfoundation.org>
>
> Y r mssng vwl.
thx ;-)
> Is richard.purdie@linuxfoundation.org now your preferred address?
Yes.
> Will rpurdie@rpsys.net cease to work?
No, it will continue to work.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-07 17:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05 15:33 [PATCH] leds: ledtrig-timer: fix broken sysfs delay handling Johan Hovold
2011-09-05 17:55 ` Florian Fainelli
2011-09-05 19:54 ` Richard Purdie
2011-09-06 23:03 ` Andrew Morton
2011-09-07 13:47 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).