linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	rpurdie@rpsys.net, ezequiel@vanguardiasur.com.ar, pavel@ucw.cz
Subject: Re: [PATCH] leds: ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity()
Date: Mon, 18 Apr 2016 16:57:15 +0200	[thread overview]
Message-ID: <20160418165715.4668ffa0@bbrezillon> (raw)
In-Reply-To: <1460990446-24700-1-git-send-email-j.anaszewski@samsung.com>

On Mon, 18 Apr 2016 16:40:46 +0200
Jacek Anaszewski <j.anaszewski@samsung.com> wrote:

> Parameters delay_on and delay_off of led_trigger_blink_oneshot()
> are pointers, to enable blink interval adjustment by LED class drivers
> of the controllers that implement hardware blinking.
> 
> Move ide_blink_delay variable to ledtrig_ide_activity() in order to
> prevent the situation when adjustment committed by one LED class
> driver influences blink interval of the software fallback blink feature,
> that is applied to the drivers that don't implement blink_set op.
> 
> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>

Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  drivers/leds/trigger/ledtrig-ide-disk.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/trigger/ledtrig-ide-disk.c b/drivers/leds/trigger/ledtrig-ide-disk.c
> index c02a3ac..15123d3 100644
> --- a/drivers/leds/trigger/ledtrig-ide-disk.c
> +++ b/drivers/leds/trigger/ledtrig-ide-disk.c
> @@ -18,10 +18,11 @@
>  #define BLINK_DELAY 30
>  
>  DEFINE_LED_TRIGGER(ledtrig_ide);
> -static unsigned long ide_blink_delay = BLINK_DELAY;
>  
>  void ledtrig_ide_activity(void)
>  {
> +	unsigned long ide_blink_delay = BLINK_DELAY;
> +
>  	led_trigger_blink_oneshot(ledtrig_ide,
>  				  &ide_blink_delay, &ide_blink_delay, 0);
>  }



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-04-18 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18 14:40 [PATCH] leds: ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity() Jacek Anaszewski
2016-04-18 14:57 ` Boris Brezillon [this message]
2016-04-19  7:09   ` Jacek Anaszewski

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=20160418165715.4668ffa0@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --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;
as well as URLs for NNTP newsgroup(s).