From b322f4095056d6849c49412eb3e36637a062e9c0 Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Mon, 12 Feb 2007 00:52:07 -0800 Subject: [PATCH] OSS: Use ARRAY_SIZE macro when appropriate 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/es1371.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/oss/es1371.c') diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index cc282a0cd539..e1fbcca8e722 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c @@ -131,6 +131,7 @@ #include #include #include +#include #include #include @@ -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); } -- cgit v1.2.3-58-ga151