From: Tobias Klauser Date: Wed, 16 Aug 2006 10:56:16 +0000 (+0200) Subject: [ALSA] sound/pci/fm801: Use ARRAY_SIZE macro X-Git-Tag: v2.6.19-rc1~1270^2~94 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=5e4968e24ced93b7b130e7e1fc947a79f82776bf;p=~emulex%2Finfiniband.git [ALSA] sound/pci/fm801: Use ARRAY_SIZE macro Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 88a3e9f3224..f3f2b2c9972 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -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, };