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: e13ef82a9a ("ASoC: SOF: add COMPILE_TEST for PCI options")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Arnd Bergmann
2019-06-17 14:45:49 +02:00
committed by Mark Brown
parent 5b8cc7d17f
commit 9de7eaddfa
3 changed files with 3 additions and 16 deletions

View File

@@ -251,11 +251,9 @@ static int sof_pci_probe(struct pci_dev *pci,
if (!sof_pdata)
return -ENOMEM;
#if IS_ENABLED(CONFIG_PCI)
ret = pcim_enable_device(pci);
if (ret < 0)
return ret;
#endif
ret = pci_request_regions(pci, "Audio DSP");
if (ret < 0)
@@ -388,7 +386,6 @@ static const struct pci_device_id sof_pci_ids[] = {
};
MODULE_DEVICE_TABLE(pci, sof_pci_ids);
#if IS_ENABLED(CONFIG_PCI)
/* pci_driver definition */
static struct pci_driver snd_sof_pci_driver = {
.name = "sof-audio-pci",
@@ -400,6 +397,5 @@ static struct pci_driver snd_sof_pci_driver = {
},
};
module_pci_driver(snd_sof_pci_driver);
#endif
MODULE_LICENSE("Dual BSD/GPL");