aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/apm.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2005-11-07 03:58:31 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:28 -0500
commit38e548ee1a79c8da7b3d9e26f2adce9b61413f84 (patch)
tree1811dc06acbba9d9bccebe6ad3fc495e96862e60 /arch/i386/kernel/apm.c
parent0d6d82b6712c808e461090dd483f111f72b3b38b (diff)
[PATCH] arch/i386: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/apm.c')
-rw-r--r--arch/i386/kernel/apm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index d2ef0c2aa93e..86e80c551478 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -447,8 +447,7 @@ static char * apm_event_name[] = {
447 "system standby resume", 447 "system standby resume",
448 "capabilities change" 448 "capabilities change"
449}; 449};
450#define NR_APM_EVENT_NAME \ 450#define NR_APM_EVENT_NAME ARRAY_SIZE(apm_event_name)
451 (sizeof(apm_event_name) / sizeof(apm_event_name[0]))
452 451
453typedef struct lookup_t { 452typedef struct lookup_t {
454 int key; 453 int key;
@@ -479,7 +478,7 @@ static const lookup_t error_table[] = {
479 { APM_NO_ERROR, "BIOS did not set a return code" }, 478 { APM_NO_ERROR, "BIOS did not set a return code" },
480 { APM_NOT_PRESENT, "No APM present" } 479 { APM_NOT_PRESENT, "No APM present" }
481}; 480};
482#define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t)) 481#define ERROR_COUNT ARRAY_SIZE(error_table)
483 482
484/** 483/**
485 * apm_error - display an APM error 484 * apm_error - display an APM error