diff -Naurp ./drivers/acpi/debug.c~acpi_array_size ./drivers/acpi/debug.c --- ./drivers/acpi/debug.c~acpi_array_size 2004-12-24 13:35:23.000000000 -0800 +++ ./drivers/acpi/debug.c 2005-01-07 07:56:19.279389952 -0800 @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -87,7 +88,6 @@ const struct acpi_dlevel acpi_debug_leve ACPI_DEBUG_INIT(ACPI_LV_FULL_TABLES), ACPI_DEBUG_INIT(ACPI_LV_EVENTS), }; -#define NUM_OF(v) ( sizeof(v)/sizeof(v[0]) ) static int acpi_system_read_debug ( @@ -109,7 +109,7 @@ acpi_system_read_debug ( switch ((unsigned long) data) { case 0: - for (i = 0; i < NUM_OF(acpi_debug_layers); i++) { + for (i = 0; i < ARRAY_SIZE(acpi_debug_layers); i++) { p += sprintf(p, "%-25s\t0x%08lX [%c]\n", acpi_debug_layers[i].name, acpi_debug_layers[i].value, @@ -126,7 +126,7 @@ acpi_system_read_debug ( acpi_dbg_layer); break; case 1: - for (i = 0; i < NUM_OF(acpi_debug_levels); i++) { + for (i = 0; i < ARRAY_SIZE(acpi_debug_levels); i++) { p += sprintf(p, "%-25s\t0x%08lX [%c]\n", acpi_debug_levels[i].name, acpi_debug_levels[i].value,