summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-06-17 15:45:49 +0300
committerMark Brown <broonie@kernel.org>2019-06-17 17:48:48 +0300
commit9de7eaddfa7f47fbb1cd9cdb9aab405599ef414e (patch)
tree3068992c6eb53093ca00c8f8014d611800ed954b /sound/soc/sof/intel/hda.c
parent5b8cc7d17f56257056ed65624dec28dcdf14e87e (diff)
downloadlinux-9de7eaddfa7f47fbb1cd9cdb9aab405599ef414e.tar.xz
ASoC: SOF: disallow building without CONFIG_PCI again
Compile-testing without PCI just causes warnings: sound/soc/sof/sof-pci-dev.c:330:13: error: 'sof_pci_remove' defined but not used [-Werror=unused-function] static void sof_pci_remove(struct pci_dev *pci) ^~~~~~~~~~~~~~ sound/soc/sof/sof-pci-dev.c:230:12: error: 'sof_pci_probe' defined but not used [-Werror=unused-function] static int sof_pci_probe(struct pci_dev *pci, ^~~~~~~~~~~~~ I tried to fix this in a way that would still allow compile tests, but it got too ugly, so this just reverts the patch that allowed it in the first place. Most architectures do allow enabling PCI, so the value of the COMPILE_TEST alternative was not very high to start with. Fixes: e13ef82a9ab8 ("ASoC: SOF: add COMPILE_TEST for PCI options") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda.c')
-rw-r--r--sound/soc/sof/intel/hda.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index af546e42e1d9..8754dfe75000 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -525,9 +525,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)
* TODO: support interrupt mode selection with kernel parameter
* support msi multiple vectors
*/
-#if IS_ENABLED(CONFIG_PCI)
ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI);
-#endif
if (ret < 0) {
dev_info(sdev->dev, "use legacy interrupt mode\n");
/*
@@ -539,9 +537,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)
sdev->msi_enabled = 0;
} else {
dev_info(sdev->dev, "use msi interrupt mode\n");
-#if IS_ENABLED(CONFIG_PCI)
hdev->irq = pci_irq_vector(pci, 0);
-#endif
/* ipc irq number is the same of hda irq */
sdev->ipc_irq = hdev->irq;
sdev->msi_enabled = 1;
@@ -598,10 +594,8 @@ free_ipc_irq:
free_hda_irq:
free_irq(hdev->irq, bus);
free_irq_vector:
-#if IS_ENABLED(CONFIG_PCI)
if (sdev->msi_enabled)
pci_free_irq_vectors(pci);
-#endif
free_streams:
hda_dsp_stream_free(sdev);
/* dsp_unmap: not currently used */
@@ -616,6 +610,7 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
{
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
struct hdac_bus *bus = sof_to_bus(sdev);
+ struct pci_dev *pci = to_pci_dev(sdev->dev);
const struct sof_intel_dsp_desc *chip = hda->desc;
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
@@ -644,12 +639,8 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)
free_irq(sdev->ipc_irq, sdev);
free_irq(hda->irq, bus);
-#if IS_ENABLED(CONFIG_PCI)
- if (sdev->msi_enabled) {
- struct pci_dev *pci = to_pci_dev(sdev->dev);
+ if (sdev->msi_enabled)
pci_free_irq_vectors(pci);
- }
-#endif
hda_dsp_stream_free(sdev);
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)