[ALSA] sound/pci/fm801: Use ARRAY_SIZE macro
authorTobias Klauser <tklauser@distanz.ch>
Wed, 16 Aug 2006 10:56:16 +0000 (12:56 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sat, 23 Sep 2006 08:41:00 +0000 (10:41 +0200)
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0])

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/fm801.c

index 88a3e9f..f3f2b2c 100644 (file)
@@ -321,10 +321,8 @@ static unsigned int channels[] = {
   2, 4, 6
 };
 
-#define CHANNELS sizeof(channels) / sizeof(channels[0])
-
 static struct snd_pcm_hw_constraint_list hw_constraints_channels = {
-       .count = CHANNELS,
+       .count = ARRAY_SIZE(channels),
        .list = channels,
        .mask = 0,
 };