diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-10-19 02:13:40 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-23 02:04:35 -0400 |
commit | 35a1e0cce647737b88dac7ca526fc525d92b3fff (patch) | |
tree | 62212f4809ae1141de21df892295aea4e9dda98c /sound/pci/hda/hda_codec.c | |
parent | c8229c38c61b1acab1f3fc28275690da71907248 (diff) |
[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.c | 9 |
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, | |||
626 | snd_hda_get_codec_name(codec, bus->card->mixername, | 626 | snd_hda_get_codec_name(codec, bus->card->mixername, |
627 | sizeof(bus->card->mixername)); | 627 | sizeof(bus->card->mixername)); |
628 | 628 | ||
629 | #ifdef CONFIG_SND_HDA_GENERIC | ||
630 | if (is_generic_config(codec)) { | 629 | if (is_generic_config(codec)) { |
631 | err = snd_hda_parse_generic_codec(codec); | 630 | err = snd_hda_parse_generic_codec(codec); |
632 | goto patched; | 631 | goto patched; |
633 | } | 632 | } |
634 | #endif | ||
635 | if (codec->preset && codec->preset->patch) { | 633 | if (codec->preset && codec->preset->patch) { |
636 | err = codec->preset->patch(codec); | 634 | err = codec->preset->patch(codec); |
637 | goto patched; | 635 | goto patched; |
638 | } | 636 | } |
639 | 637 | ||
640 | /* call the default parser */ | 638 | /* call the default parser */ |
641 | #ifdef CONFIG_SND_HDA_GENERIC | ||
642 | err = snd_hda_parse_generic_codec(codec); | 639 | err = snd_hda_parse_generic_codec(codec); |
643 | #else | 640 | if (err < 0) |
644 | printk(KERN_ERR "hda-codec: No codec parser is available\n"); | 641 | printk(KERN_ERR "hda-codec: No codec parser is available\n"); |
645 | err = -ENODEV; | ||
646 | #endif | ||
647 | 642 | ||
648 | patched: | 643 | patched: |
649 | if (err < 0) { | 644 | if (err < 0) { |