ALSA: usb-audio: mixer: Remove temporary string use in parse_clock_source_unit
[linux-2.6-microblaze.git] / sound / usb / mixer.c
index 9105ec6..985b1ae 100644 (file)
@@ -1929,7 +1929,6 @@ static int parse_clock_source_unit(struct mixer_build *state, int unitid,
        struct uac_clock_source_descriptor *hdr = _ftr;
        struct usb_mixer_elem_info *cval;
        struct snd_kcontrol *kctl;
-       char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
        int ret;
 
        if (state->mixer->protocol != UAC_VERSION_2)
@@ -1966,10 +1965,9 @@ static int parse_clock_source_unit(struct mixer_build *state, int unitid,
 
        kctl->private_free = snd_usb_mixer_elem_free;
        ret = snd_usb_copy_string_desc(state->chip, hdr->iClockSource,
-                                      name, sizeof(name));
+                                      kctl->id.name, sizeof(kctl->id.name));
        if (ret > 0)
-               snprintf(kctl->id.name, sizeof(kctl->id.name),
-                        "%s Validity", name);
+               append_ctl_name(kctl, " Validity");
        else
                snprintf(kctl->id.name, sizeof(kctl->id.name),
                         "Clock Source %d Validity", hdr->bClockID);