This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / sound / isa / gus / gus_mixer.c
index 651071a..acc25a2 100644 (file)
@@ -26,8 +26,6 @@
 #include <sound/control.h>
 #include <sound/gus.h>
 
-#define chip_t snd_gus_card_t
-
 /*
  *
  */
@@ -38,7 +36,7 @@
   .get = snd_gf1_get_single, .put = snd_gf1_put_single, \
   .private_value = shift | (invert << 8) }
 
-static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_gf1_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count = 1;
@@ -47,9 +45,9 @@ static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
        return 0;
 }
 
-static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-       snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+       struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
        int shift = kcontrol->private_value & 0xff;
        int invert = (kcontrol->private_value >> 8) & 1;
        
@@ -59,9 +57,9 @@ static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
        return 0;
 }
 
-static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-       snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+       struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
        unsigned long flags;
        int shift = kcontrol->private_value & 0xff;
        int invert = (kcontrol->private_value >> 8) & 1;
@@ -88,7 +86,7 @@ static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
   .get = snd_ics_get_double, .put = snd_ics_put_double, \
   .private_value = addr }
 
-static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ics_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count = 2;
@@ -97,9 +95,9 @@ static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
        return 0;
 }
 
-static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ics_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-       snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+       struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
        unsigned long flags;
        int addr = kcontrol->private_value & 0xff;
        unsigned char left, right;
@@ -113,9 +111,9 @@ static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
        return 0;
 }
 
-static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ics_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-       snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+       struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
        unsigned long flags;
        int addr = kcontrol->private_value & 0xff;
        int change;
@@ -148,17 +146,13 @@ static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
        return change;
 }
 
-#define GF1_CONTROLS (sizeof(snd_gf1_controls)/sizeof(snd_kcontrol_new_t))
-
-static snd_kcontrol_new_t snd_gf1_controls[] = {
+static struct snd_kcontrol_new snd_gf1_controls[] = {
 GF1_SINGLE("Master Playback Switch", 0, 1, 1),
 GF1_SINGLE("Line Switch", 0, 0, 1),
 GF1_SINGLE("Mic Switch", 0, 2, 0)
 };
 
-#define ICS_CONTROLS (sizeof(snd_ics_controls)/sizeof(snd_kcontrol_new_t))
-
-static snd_kcontrol_new_t snd_ics_controls[] = {
+static struct snd_kcontrol_new snd_ics_controls[] = {
 GF1_SINGLE("Master Playback Switch", 0, 1, 1),
 ICS_DOUBLE("Master Playback Volume", 0, SNDRV_ICS_MASTER_DEV),
 ICS_DOUBLE("Synth Playback Volume", 0, SNDRV_ICS_GF1_DEV),
@@ -169,9 +163,9 @@ ICS_DOUBLE("Mic Playback Volume", 0, SNDRV_ICS_MIC_DEV),
 ICS_DOUBLE("CD Playback Volume", 0, SNDRV_ICS_CD_DEV)
 };
 
-int snd_gf1_new_mixer(snd_gus_card_t * gus)
+int snd_gf1_new_mixer(struct snd_gus_card * gus)
 {
-       snd_card_t *card;
+       struct snd_card *card;
        unsigned int idx, max;
        int err;
 
@@ -190,13 +184,13 @@ int snd_gf1_new_mixer(snd_gus_card_t * gus)
        }
 
        if (!gus->ics_flag) {
-               max = gus->ess_flag ? 1 : GF1_CONTROLS;
+               max = gus->ess_flag ? 1 : ARRAY_SIZE(snd_gf1_controls);
                for (idx = 0; idx < max; idx++) {
                        if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_gf1_controls[idx], gus))) < 0)
                                return err;
                }
        } else {
-               for (idx = 0; idx < ICS_CONTROLS; idx++) {
+               for (idx = 0; idx < ARRAY_SIZE(snd_ics_controls); idx++) {
                        if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ics_controls[idx], gus))) < 0)
                                return err;
                }