Skip to contentSkip to conversation

sound/pci/fm801: Use ARRAY_SIZE macro

PATCH New Tobias Klauser 1 participant 1 message Aug 11, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound/pci/fm801: Use ARRAY_SIZE macro

Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0])

---
 sound/pci/fm801.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
sound/pci/fm801.c +1 -3
index 13868c9..17ab02f 100644
@@ -318,10 +318,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,
 };
Signature · 6 lines
1.4.1

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors