diff options
Diffstat (limited to 'arch/i386/kernel/apm.c')
-rw-r--r-- | arch/i386/kernel/apm.c | 5 |
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 | ||
453 | typedef struct lookup_t { | 452 | typedef 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 |