]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[ALSA] ali5451 - Don't build non-existing modem PCM
authorTakashi Iwai <tiwai@suse.de>
Tue, 4 Oct 2005 11:50:44 +0000 (13:50 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 7 Oct 2005 12:46:36 +0000 (14:46 +0200)
ALI5451 driver
Don't build the modem PCM if the corresponding codec isn't detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ali5451/ali5451.c

index d683f7736a63b16935a443da3d44803be74cf207..f35b558c29b2474b2e4bd8168c00c4b0bffd5841 100644 (file)
@@ -1993,8 +1993,10 @@ static int __devinit snd_ali_mixer(ali_t * codec)
                if ((err = snd_ac97_mixer(codec->ac97_bus, &ac97, &codec->ac97[i])) < 0) {
                        snd_printk("ali mixer %d creating error.\n", i);
                        if(i == 0)
-               return err;
-       }
+                               return err;
+                       codec->num_of_codecs = 1;
+                       break;
+               }
        }
 
        if (codec->spdif_support) {