summaryrefslogtreecommitdiffstats
path: root/sound/oss/es1371.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-12 00:52:07 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 09:48:28 -0800
commitb322f4095056d6849c49412eb3e36637a062e9c0 (patch)
treee9923a60b1a38cd6d1609d21fe74d7dada28e09f /sound/oss/es1371.c
parent9d0094de6dfda8209241787d99f531356469d0f5 (diff)
downloadop-kernel-dev-b322f4095056d6849c49412eb3e36637a062e9c0.zip
op-kernel-dev-b322f4095056d6849c49412eb3e36637a062e9c0.tar.gz
[PATCH] OSS: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/oss/es1371.c')
-rw-r--r--sound/oss/es1371.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c
index cc282a0cd..e1fbcca 100644
--- a/sound/oss/es1371.c
+++ b/sound/oss/es1371.c
@@ -131,6 +131,7 @@
#include <linux/dma-mapping.h>
#include <linux/mutex.h>
#include <linux/mm.h>
+#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/page.h>
@@ -2998,7 +2999,7 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic
set_fs(KERNEL_DS);
val = SOUND_MASK_LINE;
mixdev_ioctl(s->codec, 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;
mixdev_ioctl(s->codec, initvol[i].mixch, (unsigned long)&val);
}
OpenPOWER on IntegriCloud