diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2007-02-12 03:52:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:28 -0500 |
commit | b322f4095056d6849c49412eb3e36637a062e9c0 (patch) | |
tree | e9923a60b1a38cd6d1609d21fe74d7dada28e09f /sound/oss/soundcard.c | |
parent | 9d0094de6dfda8209241787d99f531356469d0f5 (diff) |
[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/soundcard.c')
-rw-r--r-- | sound/oss/soundcard.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index a89108cb74ea..b92c8cd1aeaf 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/ctype.h> | 32 | #include <linux/ctype.h> |
33 | #include <linux/stddef.h> | 33 | #include <linux/stddef.h> |
34 | #include <linux/kmod.h> | 34 | #include <linux/kmod.h> |
35 | #include <linux/kernel.h> | ||
35 | #include <asm/dma.h> | 36 | #include <asm/dma.h> |
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
37 | #include <linux/wait.h> | 38 | #include <linux/wait.h> |
@@ -557,7 +558,7 @@ static int __init oss_init(void) | |||
557 | /* Protecting the innocent */ | 558 | /* Protecting the innocent */ |
558 | sound_dmap_flag = (dmabuf > 0 ? 1 : 0); | 559 | sound_dmap_flag = (dmabuf > 0 ? 1 : 0); |
559 | 560 | ||
560 | for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { | 561 | for (i = 0; i < ARRAY_SIZE(dev_list); i++) { |
561 | device_create(sound_class, NULL, | 562 | device_create(sound_class, NULL, |
562 | MKDEV(SOUND_MAJOR, dev_list[i].minor), | 563 | MKDEV(SOUND_MAJOR, dev_list[i].minor), |
563 | "%s", dev_list[i].name); | 564 | "%s", dev_list[i].name); |
@@ -581,7 +582,7 @@ static void __exit oss_cleanup(void) | |||
581 | { | 582 | { |
582 | int i, j; | 583 | int i, j; |
583 | 584 | ||
584 | for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { | 585 | for (i = 0; i < ARRAY_SIZE(dev_list); i++) { |
585 | device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor)); | 586 | device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor)); |
586 | if (!dev_list[i].num) | 587 | if (!dev_list[i].num) |
587 | continue; | 588 | continue; |