[PATCH 2/3] led: core: Initialize blink_next_event with 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A simpler way to make pattern to trigger immediately is to initialize
blink_next_event to 0 instead of current time value. Save a function
call and convert the code to do just that.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 drivers/led/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/led/core.c b/drivers/led/core.c
index f11504ace..34c514be8 100644
--- a/drivers/led/core.c
+++ b/drivers/led/core.c
@@ -177,7 +177,7 @@ int led_blink_pattern(struct led *led, const unsigned int *pattern,
 				    pattern_len * sizeof(*led->blink_states));
 	led->blink_nr_states = pattern_len;
 	led->blink_next_state = 0;
-	led->blink_next_event = get_time_ns();
+	led->blink_next_event = 0;
 	led->blink = 1;
 	led->flash = 0;
 
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux