From: Andrew Morton <akpm@linux-foundation.org>
To: eha@doredevelopment.dk
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>
Subject: Re: [PATCH] leds: Support automatic start of blinking with ledtrig-timer
Date: Thu, 7 Apr 2011 16:34:15 -0700 [thread overview]
Message-ID: <20110407163415.0eb0f545.akpm@linux-foundation.org> (raw)
In-Reply-To: <1300446199-3234-1-git-send-email-eha@doredevelopment.dk>
On Fri, 18 Mar 2011 12:03:19 +0100
eha@doredevelopment.dk wrote:
> From: Esben Haabendal <eha@doredevelopment.dk>
>
> By setting initial values blink_delay_on and blink_delay_off in a
> led_classdev struct, this change starts the blinking when the led
> is initialized.
>
> Signed-off-by: Esben Haabendal <eha@doredevelopment.dk>
> ---
> drivers/leds/led-class.c | 3 ++-
> drivers/leds/ledtrig-timer.c | 3 +++
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
> index d5a4ade..d7bdef8 100644
> --- a/drivers/leds/led-class.c
> +++ b/drivers/leds/led-class.c
> @@ -131,7 +131,8 @@ static void led_set_software_blink(struct led_classdev *led_cdev,
> if (!led_cdev->blink_brightness)
> led_cdev->blink_brightness = led_cdev->max_brightness;
>
> - if (delay_on == led_cdev->blink_delay_on &&
> + if (led_cdev->trigger_data &&
> + delay_on == led_cdev->blink_delay_on &&
> delay_off == led_cdev->blink_delay_off)
> return;
>
> diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
> index b09bcbe..d87c9d0 100644
> --- a/drivers/leds/ledtrig-timer.c
> +++ b/drivers/leds/ledtrig-timer.c
> @@ -91,6 +91,9 @@ static void timer_trig_activate(struct led_classdev *led_cdev)
> if (rc)
> goto err_out_delayon;
>
> + led_blink_set(led_cdev, &led_cdev->blink_delay_on,
> + &led_cdev->blink_delay_off);
> +
> led_cdev->trigger_data = (void *)1;
>
> return;
It's unclear (to me) exactly what this patch does. Could you please
send a more complete description of the user-visible change in
behaviour?
Thanks.
next prev parent reply other threads:[~2011-04-07 23:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 11:03 [PATCH] leds: Support automatic start of blinking with ledtrig-timer eha
2011-04-07 23:34 ` Andrew Morton [this message]
2011-04-08 4:43 ` Esben Haabendal
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=20110407163415.0eb0f545.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=eha@doredevelopment.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox