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 @@
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/moduleparam.h>
#include <asm/uaccess.h>
#include <acpi/acpi_drivers.h>
......@@ -87,7 +88,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 +100,7 @@ acpi_system_read_debug (
{
char *p = page;
int size = 0;
int i;
unsigned int i;
if (off != 0)
goto end;
......@@ -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,
......
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