From 8b5925fd5461c9f1ac77ede48945ca1945202ddb Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Mon, 12 Feb 2007 00:52:08 -0800 Subject: [PATCH] [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/au1550_ac97.c | 4 ++-- sound/oss/nec_vrc5477.c | 4 ++-- sound/oss/swarm_cs4297a.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 219795171c..a339f0c0d5 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c @@ -1354,11 +1354,11 @@ au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ((file->f_mode & FMODE_READ) && s->dma_adc.mapped); #ifdef DEBUG - for (count=0; count #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); } -- 2.39.5