Skip to contentSkip to conversation

ALSA: hda/ca0132 - Fix build error without CONFIG_PCI

PATCH In review Takashi Iwai 2 participants 3 messages Feb 5, 2019 – Feb 6, 2019 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/ca0132 - Fix build error without CONFIG_PCI

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 1e73359a24fa ("ALSA: hda/ca0132 - make pci_iounmap() call conditional")
---
 sound/pci/hda/patch_ca0132.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/pci/hda/patch_ca0132.c +3 -1
index e5bdbc245682..29882bda7632 100644
@@ -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);
 }
Signature · 1 line
2.16.4
#1 lore raw

Hi Takashi-san

Quoted 10 lines

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 1e73359a24fa ("ALSA: hda/ca0132 - make pci_iounmap() call conditional")

---

Thanks.
It solved my SH compile issue !!

Best regards
---
Kuninori Morimoto

#2 lore raw
Quoted 10 lines · Kuninori Morimoto

Hi Takashi-san

Quoted 6 lines

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.

Quoted 7 lines
Quoted 4 lines
Fixes 1e73359a24fa ("ALSA: hda/ca0132 - make pci_iounmap() call conditional")

---

Thanks.
It solved my SH compile issue !!

OK, queued to for-linus branch now.

thanks,

Takashi