diff options
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 9b713b4a5ec4..43bc59575a6e 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -1572,9 +1572,9 @@ static size_t append_ctl_name(struct snd_kcontrol *kctl, const char *str) static void check_no_speaker_on_headset(struct snd_kcontrol *kctl, struct snd_card *card) { - const char *names_to_check[] = { + static const char * const names_to_check[] = { "Headset", "headset", "Headphone", "headphone", NULL}; - const char **s; + const char * const *s; bool found = false; if (strcmp("Speaker", kctl->id.name)) @@ -3183,7 +3183,6 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer) state.map = map->map; state.selector_map = map->selector_map; mixer->connector_map = map->connector_map; - mixer->ignore_ctl_error |= map->ignore_ctl_error; break; } } @@ -3508,8 +3507,7 @@ static int snd_usb_mixer_status_create(struct usb_mixer_interface *mixer) return 0; } -int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, - int ignore_error) +int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif) { static const struct snd_device_ops dev_ops = { .dev_free = snd_usb_mixer_dev_free @@ -3523,7 +3521,7 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, if (!mixer) return -ENOMEM; mixer->chip = chip; - mixer->ignore_ctl_error = ignore_error; + mixer->ignore_ctl_error = !!(chip->quirk_flags & QUIRK_FLAG_IGNORE_CTL_ERROR); mixer->id_elems = kcalloc(MAX_ID_ELEMS, sizeof(*mixer->id_elems), GFP_KERNEL); if (!mixer->id_elems) { |