diff options
author | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-09-29 05:00:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:14 -0400 |
commit | 6c2d8b5dcad468cb0bdec3368b53383bde51e487 (patch) | |
tree | 5dea01c439ee037c32c09ec7c98e990b8e275e0a /sound/sparc | |
parent | 2ad3479decccd12301a3f9920a22fa567d4bdae8 (diff) |
[PATCH] sound/sparc/dbri: Use ARRAY_SIZE macro
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: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/sparc')
-rw-r--r-- | sound/sparc/dbri.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 8016541ec16d..5a97be689b40 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -2412,8 +2412,6 @@ static struct snd_kcontrol_new dbri_controls[] __devinitdata = { | |||
2412 | CS4215_SINGLE("Mic boost", 4, 4, 1, 1) | 2412 | CS4215_SINGLE("Mic boost", 4, 4, 1, 1) |
2413 | }; | 2413 | }; |
2414 | 2414 | ||
2415 | #define NUM_CS4215_CONTROLS (sizeof(dbri_controls)/sizeof(struct snd_kcontrol_new)) | ||
2416 | |||
2417 | static int __init snd_dbri_mixer(struct snd_dbri * dbri) | 2415 | static int __init snd_dbri_mixer(struct snd_dbri * dbri) |
2418 | { | 2416 | { |
2419 | struct snd_card *card; | 2417 | struct snd_card *card; |
@@ -2424,7 +2422,7 @@ static int __init snd_dbri_mixer(struct snd_dbri * dbri) | |||
2424 | card = dbri->card; | 2422 | card = dbri->card; |
2425 | strcpy(card->mixername, card->shortname); | 2423 | strcpy(card->mixername, card->shortname); |
2426 | 2424 | ||
2427 | for (idx = 0; idx < NUM_CS4215_CONTROLS; idx++) { | 2425 | for (idx = 0; idx < ARRAY_SIZE(dbri_controls); idx++) { |
2428 | if ((err = snd_ctl_add(card, | 2426 | if ((err = snd_ctl_add(card, |
2429 | snd_ctl_new1(&dbri_controls[idx], dbri))) < 0) | 2427 | snd_ctl_new1(&dbri_controls[idx], dbri))) < 0) |
2430 | return err; | 2428 | return err; |