#include <linux/proc_fs.h>
#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
#include <linux/moduleparam.h>
#include <asm/uaccess.h>
#include <acpi/acpi_drivers.h>
+#include <acpi/acglobal.h>
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME ("debug")
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 (
{
char *p = page;
int size = 0;
- int i;
+ unsigned int i;
if (off != 0)
goto end;
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,
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,