Commit cf6fea8c authored by Jacek Anaszewski's avatar Jacek Anaszewski

leds: ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity()

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.
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
parent 4a91c45e
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
#define BLINK_DELAY 30 #define BLINK_DELAY 30
DEFINE_LED_TRIGGER(ledtrig_ide); DEFINE_LED_TRIGGER(ledtrig_ide);
static unsigned long ide_blink_delay = BLINK_DELAY;
void ledtrig_ide_activity(void) void ledtrig_ide_activity(void)
{ {
unsigned long ide_blink_delay = BLINK_DELAY;
led_trigger_blink_oneshot(ledtrig_ide, led_trigger_blink_oneshot(ledtrig_ide,
&ide_blink_delay, &ide_blink_delay, 0); &ide_blink_delay, &ide_blink_delay, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment