summaryrefslogtreecommitdiff
path: root/tools/mkimage.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-05-07 06:11:49 +0000
committerTom Rini <trini@ti.com>2013-05-14 15:37:24 -0400
commit816cb037adf94ead77593812ccd3244d506175fa (patch)
tree67c099913fcc366a4a20fb8a73511c321c003c4a /tools/mkimage.h
parente9c8b445516e18eb900eba609e211310b25bee03 (diff)
downloadu-boot-imx-816cb037adf94ead77593812ccd3244d506175fa.zip
u-boot-imx-816cb037adf94ead77593812ccd3244d506175fa.tar.gz
u-boot-imx-816cb037adf94ead77593812ccd3244d506175fa.tar.bz2
mkimage: Move ARRAY_SIZE to header file
Move this definition from aisimage.c to mkimage.h so that it is available more widely. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'tools/mkimage.h')
-rw-r--r--tools/mkimage.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/mkimage.h b/tools/mkimage.h
index ea45f5c..e07a615 100644
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -42,6 +42,8 @@
#define debug(fmt,args...)
#endif /* MKIMAGE_DEBUG */
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
#define MKIMAGE_MAX_TMPFILE_LEN 256
#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"