summaryrefslogtreecommitdiff
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-12-10 21:54:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-27 14:14:41 +0900
commitc8e91d756703b06c707b4355a3603e4e2fd2790a (patch)
tree42d79068ad3eab8026816c913ce1e2d008b40f3e /sound/pci/hda
parent4a767459389a8db376854ebfc0cafe6504768554 (diff)
ALSA: hda/ca0132 - make pci_iounmap() call conditional
commit 1e73359a24fad529b0794515b46cbfff99e5fbe6 upstream. When building without CONFIG_PCI, we can (depending on the architecture) get a link failure: ERROR: "pci_iounmap" [sound/pci/hda/snd-hda-codec-ca0132.ko] undefined! Adding a compile-time check for PCI gets it to work correctly on 32-bit ARM. Fixes: d99501b8575d ("ALSA: hda/ca0132 - Call pci_iounmap() instead of iounmap()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_ca0132.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index dffd60cebc31..80f73810b21b 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -7394,7 +7394,7 @@ static void ca0132_free(struct hda_codec *codec)
ca0132_exit_chip(codec);
snd_hda_power_down(codec);
- if (spec->mem_base)
+ if (IS_ENABLED(CONFIG_PCI) && spec->mem_base)
pci_iounmap(codec->bus->pci, spec->mem_base);
kfree(spec->spec_init_verbs);
kfree(codec->spec);