Skip to content

Commit

Permalink
ALSA: hda/ca0132 - make pci_iounmap() call conditional
Browse files Browse the repository at this point in the history
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: d99501b ("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>
  • Loading branch information
Arnd Bergmann authored and Takashi Iwai committed Dec 11, 2018
1 parent 46079ba commit 1e73359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -8451,7 +8451,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);
Expand Down

0 comments on commit 1e73359

Please sign in to comment.