diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2019-05-30 06:50:15 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-30 16:35:26 +0100 |
commit | e13ef82a9ab83dd21d8dd43ef9f5e8bf5b101106 (patch) | |
tree | 2f7732bdbd21e1c9785d1a6e2912a8c4c53a6d0b /sound/soc/sof/sof-pci-dev.c | |
parent | 8fe751d8fd5cbf19e9d7852c5b7d8ed818be1934 (diff) |
ASoC: SOF: add COMPILE_TEST for PCI options
Add COMPILE_TEST and use IS_ENABLED(CONFIG_PCI) to sort out
cross-compilation issues.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-pci-dev.c')
-rw-r--r-- | sound/soc/sof/sof-pci-dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index e2b19782f01a..ab58d4f9119f 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -251,9 +251,11 @@ 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) @@ -386,6 +388,7 @@ 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", @@ -397,5 +400,6 @@ static struct pci_driver snd_sof_pci_driver = { }, }; module_pci_driver(snd_sof_pci_driver); +#endif MODULE_LICENSE("Dual BSD/GPL"); |