Commit 362aeea4 authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] Use kernel.h for ARRAY_SIZE() instead of using local NUM_OF().

Signed-off-by: default avatarRandy Dunlap <rddunlap@osdl.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent e1680e64
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <acpi/acpi_drivers.h> #include <acpi/acpi_drivers.h>
...@@ -87,7 +88,6 @@ const struct acpi_dlevel acpi_debug_levels[] = ...@@ -87,7 +88,6 @@ const struct acpi_dlevel acpi_debug_levels[] =
ACPI_DEBUG_INIT(ACPI_LV_FULL_TABLES), ACPI_DEBUG_INIT(ACPI_LV_FULL_TABLES),
ACPI_DEBUG_INIT(ACPI_LV_EVENTS), ACPI_DEBUG_INIT(ACPI_LV_EVENTS),
}; };
#define NUM_OF(v) ( sizeof(v)/sizeof(v[0]) )
static int static int
acpi_system_read_debug ( acpi_system_read_debug (
...@@ -100,7 +100,7 @@ acpi_system_read_debug ( ...@@ -100,7 +100,7 @@ acpi_system_read_debug (
{ {
char *p = page; char *p = page;
int size = 0; int size = 0;
int i; unsigned int i;
if (off != 0) if (off != 0)
goto end; goto end;
...@@ -109,7 +109,7 @@ acpi_system_read_debug ( ...@@ -109,7 +109,7 @@ acpi_system_read_debug (
switch ((unsigned long) data) { switch ((unsigned long) data) {
case 0: 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", p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
acpi_debug_layers[i].name, acpi_debug_layers[i].name,
acpi_debug_layers[i].value, acpi_debug_layers[i].value,
...@@ -126,7 +126,7 @@ acpi_system_read_debug ( ...@@ -126,7 +126,7 @@ acpi_system_read_debug (
acpi_dbg_layer); acpi_dbg_layer);
break; break;
case 1: 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", p += sprintf(p, "%-25s\t0x%08lX [%c]\n",
acpi_debug_levels[i].name, acpi_debug_levels[i].name,
acpi_debug_levels[i].value, acpi_debug_levels[i].value,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment