From 5b8b9650a18dd10eb8e7de9082b4aa9df601d09d Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 10 Dec 2007 12:28:52 +0100 Subject: [PATCH] --- yaml --- r: 81533 b: refs/heads/master c: 69a07304d52cc1080fa650c4ba7a82eed3cd143c h: refs/heads/master i: 81531: 8dbf9c462eff1cc7e75f7476bd04ecc8a4691baf v: v3 --- [refs] | 2 +- trunk/sound/pci/cmipci.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 721e7d8096ed..c6987837b803 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: befceea90b17792cb03cc4e22f3329c89621bba3 +refs/heads/master: 69a07304d52cc1080fa650c4ba7a82eed3cd143c diff --git a/trunk/sound/pci/cmipci.c b/trunk/sound/pci/cmipci.c index 187203e55d39..8cb3436d0d9c 100644 --- a/trunk/sound/pci/cmipci.c +++ b/trunk/sound/pci/cmipci.c @@ -2651,10 +2651,8 @@ static struct snd_kcontrol_new snd_cmipci_extra_mixer_switches[] __devinitdata = }; /* card control switches */ -static struct snd_kcontrol_new snd_cmipci_control_switches[] __devinitdata = { - // DEFINE_CARD_SWITCH("Joystick", joystick), /* now module option */ - DEFINE_CARD_SWITCH("Modem", modem), -}; +static struct snd_kcontrol_new snd_cmipci_modem_switch __devinitdata = +DEFINE_CARD_SWITCH("Modem", modem); static int __devinit snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_device) @@ -2735,9 +2733,9 @@ static int __devinit snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_devic } /* card switches */ - sw = snd_cmipci_control_switches; - for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_control_switches); idx++, sw++) { - err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm)); + if (cm->chip_version < 39) { + err = snd_ctl_add(cm->card, + snd_ctl_new1(&snd_cmipci_modem_switch, cm)); if (err < 0) return err; }