Author: uwe Date: 2007-10-27 22:05:21 +0200 (Sat, 27 Oct 2007) New Revision: 2901
Modified: trunk/LinuxBIOSv2/src/include/stdlib.h trunk/LinuxBIOSv2/src/superio/smsc/smscsuperio/superio.c Log: Move ARRAY_SIZE to stdlib.h to make it available to all code (trivial).
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Uwe Hermann uwe@hermann-uwe.de
Modified: trunk/LinuxBIOSv2/src/include/stdlib.h =================================================================== --- trunk/LinuxBIOSv2/src/include/stdlib.h 2007-10-27 19:45:49 UTC (rev 2900) +++ trunk/LinuxBIOSv2/src/include/stdlib.h 2007-10-27 20:05:21 UTC (rev 2901) @@ -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);
Modified: trunk/LinuxBIOSv2/src/superio/smsc/smscsuperio/superio.c =================================================================== --- trunk/LinuxBIOSv2/src/superio/smsc/smscsuperio/superio.c 2007-10-27 19:45:49 UTC (rev 2900) +++ trunk/LinuxBIOSv2/src/superio/smsc/smscsuperio/superio.c 2007-10-27 20:05:21 UTC (rev 2901) @@ -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 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