From 8b5925fd5461c9f1ac77ede48945ca1945202ddb Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Mon, 12 Feb 2007 00:52:08 -0800 Subject: [PATCH] OSS: Use ARRAY_SIZE macro when appropriate (2) Use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/swarm_cs4297a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/oss/swarm_cs4297a.c') diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 471c274c5000..9f7e5f59ac82 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c @@ -77,6 +77,7 @@ #include #include #include +#include #include #include @@ -2676,7 +2677,7 @@ static int __init cs4297a_init(void) #if 0 val = SOUND_MASK_LINE; mixer_ioctl(s, SOUND_MIXER_WRITE_RECSRC, (unsigned long) &val); - for (i = 0; i < sizeof(initvol) / sizeof(initvol[0]); i++) { + for (i = 0; i < ARRAY_SIZE(initvol); i++) { val = initvol[i].vol; mixer_ioctl(s, initvol[i].mixch, (unsigned long) &val); } -- cgit v1.2.1