mkimage: Move ARRAY_SIZE to header file
authorSimon Glass <sjg@chromium.org>
Tue, 7 May 2013 06:11:49 +0000 (06:11 +0000)
committerTom Rini <trini@ti.com>
Tue, 14 May 2013 19:37:24 +0000 (15:37 -0400)
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>
tools/aisimage.c
tools/mkimage.h

index c645708da5984875113d0cdbf4a73b694c3ca0a2..659df8c0ee7cb611e0fe48c1073146afeb40c502 100644 (file)
@@ -32,7 +32,6 @@
 #define WORD_ALIGN0    4
 #define WORD_ALIGN(len) (((len)+WORD_ALIGN0-1) & ~(WORD_ALIGN0-1))
 #define MAX_CMD_BUFFER 4096
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
 static uint32_t ais_img_size;
 
index ea45f5c834910196560cc0c65612d51ddbbb7250..e07a6157ebca0052d66b7713686e46df8d7ea655 100644 (file)
@@ -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"