X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Facpi%2Fdebug.c;h=d947e2a0a46291d89085a12ed4dfc156da7b7ce0;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9fb8caedbed124b5e6726a38e9ed84988949108a;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c index 9fb8caedb..d947e2a0a 100644 --- a/drivers/acpi/debug.c +++ b/drivers/acpi/debug.c @@ -4,9 +4,12 @@ #include #include +#include +#include #include #include #include +#include #define _COMPONENT ACPI_SYSTEM_COMPONENT ACPI_MODULE_NAME ("debug") @@ -87,7 +90,6 @@ const struct acpi_dlevel acpi_debug_levels[] = 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 ( @@ -100,7 +102,7 @@ acpi_system_read_debug ( { char *p = page; int size = 0; - int i; + unsigned int i; if (off != 0) goto end; @@ -109,7 +111,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 +128,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,