aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-10-19 08:13:40 +0200
committerJaroslav Kysela <perex@perex.cz>2007-10-23 08:04:35 +0200
commit35a1e0cce647737b88dac7ca526fc525d92b3fff (patch)
tree62212f4809ae1141de21df892295aea4e9dda98c /sound/pci/hda/hda_codec.c
parent[ALSA] hda-codec - Fix Conexant 5045 volumes (diff)
downloadlinux-dev-35a1e0cce647737b88dac7ca526fc525d92b3fff.tar.xz
linux-dev-35a1e0cce647737b88dac7ca526fc525d92b3fff.zip
[ALSA] hda-codec - Fix build without CONFIG_SND_HDA_GENERIC
Fixed the build error from patch_sigmatel.c when built without CONFIG_SND_HDA_GENERIC by defining a dummy function to return error. Also, clean up hda_codec.c by removing unneeded ifdefs (the compiler will optimize out). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 187533e477c6..ad4cb38109fc 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -626,24 +626,19 @@ int __devinit snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
snd_hda_get_codec_name(codec, bus->card->mixername,
sizeof(bus->card->mixername));
-#ifdef CONFIG_SND_HDA_GENERIC
if (is_generic_config(codec)) {
err = snd_hda_parse_generic_codec(codec);
goto patched;
}
-#endif
if (codec->preset && codec->preset->patch) {
err = codec->preset->patch(codec);
goto patched;
}
/* call the default parser */
-#ifdef CONFIG_SND_HDA_GENERIC
err = snd_hda_parse_generic_codec(codec);
-#else
- printk(KERN_ERR "hda-codec: No codec parser is available\n");
- err = -ENODEV;
-#endif
+ if (err < 0)
+ printk(KERN_ERR "hda-codec: No codec parser is available\n");
patched:
if (err < 0) {