Move ARRAY_SIZE to stdlib.h to make it available to all code (trivial).
authorUwe Hermann <uwe@hermann-uwe.de>
Sat, 27 Oct 2007 20:05:21 +0000 (20:05 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Sat, 27 Oct 2007 20:05:21 +0000 (20:05 +0000)
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2901 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/include/stdlib.h
src/superio/smsc/smscsuperio/superio.c

index eb67d20fe7c6009230c798921ec289c15e859513..8bae40f2e1ffd56d7e0fb2a34f6984c7de7dc6a5 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <stddef.h>
 
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
 extern void *malloc(size_t size);
 void free(void *ptr);
 
index 0ae1818ceb3151a50f583cf2566581937195704a..20e5cf662f215b3a98e6bca7e6def9097141c41b 100644 (file)
@@ -40,6 +40,7 @@
 #include <console/console.h>
 #include <uart8250.h>
 #include <pc80/keyboard.h>
+#include <stdlib.h>
 #include "chip.h"
 
 /* The following Super I/O chips are currently supported by this driver: */
@@ -66,9 +67,6 @@ static int first_time = 1;
 static uint8_t superio_id = 0;
 static uint8_t superio_rev = 0;
 
-/* TODO: Move somewhere else, but where? */
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
 /**
  * A list of all possible logical devices which may be supported by at least
  * one of the Super I/O chips. These values are used as index into the