From: Ahmed S. Darwish Date: Mon, 12 Feb 2007 08:52:08 +0000 (-0800) Subject: [PATCH] OSS: Use ARRAY_SIZE macro when appropriate (2) X-Git-Tag: v2.6.21-rc1~274^2~188 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b5925fd5461c9f1ac77ede48945ca1945202ddb;p=linux-2.6 [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 --- 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); }