Skip to content

Commit

Permalink
ALSA: hda/ca0132 - Fix build error without CONFIG_PCI
Browse files Browse the repository at this point in the history
A call of pci_iounmap() call without CONFIG_PCI leads to a build error
on some architectures.  We tried to address this and add a check of
IS_ENABLED(CONFIG_PCI), but this still doesn't seem enough for sh.
Ideally we should fix it globally, it's really a corner case, so let's
paper over it with a simpler ifdef.

Fixes: 1e73359 ("ALSA: hda/ca0132 - make pci_iounmap() call conditional")
Reported-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 6, 2019
1 parent 4f2ab5e commit c97617a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -8451,8 +8451,10 @@ static void ca0132_free(struct hda_codec *codec)
ca0132_exit_chip(codec);

snd_hda_power_down(codec);
if (IS_ENABLED(CONFIG_PCI) && spec->mem_base)
#ifdef CONFIG_PCI
if (spec->mem_base)
pci_iounmap(codec->bus->pci, spec->mem_base);
#endif
kfree(spec->spec_init_verbs);
kfree(codec->spec);
}
Expand Down

0 comments on commit c97617a

Please sign in to comment.