[PATCH 3/3] led: core: Make use of ARRAY_AND_SIZE

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

 



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

diff --git a/drivers/led/core.c b/drivers/led/core.c
index 34c514be8..431966d06 100644
--- a/drivers/led/core.c
+++ b/drivers/led/core.c
@@ -188,7 +188,7 @@ int led_blink(struct led *led, unsigned int on_ms, unsigned int off_ms)
 {
 	unsigned int pattern[] = {on_ms, off_ms};
 
-	return led_blink_pattern(led, pattern, 2);
+	return led_blink_pattern(led, ARRAY_AND_SIZE(pattern));
 }
 
 int led_flash(struct led *led, unsigned int duration_ms)
@@ -196,7 +196,7 @@ int led_flash(struct led *led, unsigned int duration_ms)
 	unsigned int pattern[] = {duration_ms, 0};
 	int ret;
 
-	ret = led_blink_pattern(led, pattern, 2);
+	ret = led_blink_pattern(led, ARRAY_AND_SIZE(pattern));
 	if (ret)
 		return ret;
 
-- 
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