From: Andrew Morton - Use ARRAY_SIZE() - Save some space by building the array at compile time. Cc: Jordan Crouse Cc: Stephen Rothwell Signed-off-by: Andrew Morton --- arch/i386/kernel/apm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN arch/i386/kernel/apm.c~apm-screen-blanking-fix-tidy arch/i386/kernel/apm.c --- 25/arch/i386/kernel/apm.c~apm-screen-blanking-fix-tidy Thu Dec 15 13:47:49 2005 +++ 25-akpm/arch/i386/kernel/apm.c Thu Dec 15 13:47:49 2005 @@ -1066,11 +1066,11 @@ static int apm_console_blank(int blank) { int error, i; u_short state; - u_short dev[3] = { 0x100, 0x1FF, 0x101 }; + static const u_short dev[3] = { 0x100, 0x1FF, 0x101 }; state = blank ? APM_STATE_STANDBY : APM_STATE_READY; - for (i = 0; i < 3; i++) { + for (i = 0; i < ARRAY_SIZE(dev); i++) { error = set_power_state(dev[i], state); if ((error == APM_SUCCESS) || (error == APM_NO_ERROR)) _