summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-11-19 19:15:00 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2021-11-20 14:45:33 +0100
commit76fce3e8f3bd4e13fa3b058d72213f049059498a (patch)
treeca0e48a44516da74914fcaa109fe448bf45c5134
parent4f7f4632effdff629d151988177174722a39517f (diff)
tools/testing/selftests/ir/: Don't redefine ARRAY_SIZE()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--tools/testing/selftests/ir/ir_loopback.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/ir/ir_loopback.c b/tools/testing/selftests/ir/ir_loopback.c
index af7f9c7d59bc..2f86f1da2ae0 100644
--- a/tools/testing/selftests/ir/ir_loopback.c
+++ b/tools/testing/selftests/ir/ir_loopback.c
@@ -9,6 +9,8 @@
// wait until that is scheduled, hence we use poll to check for read
// readiness.
+
+#include <linux/array_size.h>
#include <linux/lirc.h>
#include <errno.h>
#include <stdio.h>
@@ -25,8 +27,8 @@
#include <fcntl.h>
#include "../kselftest.h"
+
#define TEST_SCANCODES 10
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#define SYSFS_PATH_MAX 256
#define DNAME_PATH_MAX 256