diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-05-31 10:25:26 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-04 10:30:22 -0400 |
commit | ad169f9f0dbb531cd68db921b351ccafcf684ae4 (patch) | |
tree | 2d165d30732b210fdd3668683f2f3d9f26b02894 /sound | |
parent | 14104eb6a351a5bad21fdd2cf05ca46ad5e5beab (diff) |
ASoC: SOF: Intel: hda: Fix COMPILE_TEST build error
while building without PCI:
sound/soc/sof/intel/hda.o: In function `hda_dsp_probe':
hda.c:(.text+0x79c): undefined reference to `pci_ioremap_bar'
hda.c:(.text+0x79c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `pci_ioremap_bar'
hda.c:(.text+0x7c4): undefined reference to `pci_ioremap_bar'
hda.c:(.text+0x7c4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `pci_ioremap_bar'
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e13ef82a9ab8 ("ASoC: SOF: add COMPILE_TEST for PCI options")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sof/intel/hda.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 8f5c68861bbc..9e2e0f21524e 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c | |||
@@ -227,7 +227,9 @@ static int hda_init(struct snd_sof_dev *sdev) | |||
227 | 227 | ||
228 | /* initialise hdac bus */ | 228 | /* initialise hdac bus */ |
229 | bus->addr = pci_resource_start(pci, 0); | 229 | bus->addr = pci_resource_start(pci, 0); |
230 | #if IS_ENABLED(CONFIG_PCI) | ||
230 | bus->remap_addr = pci_ioremap_bar(pci, 0); | 231 | bus->remap_addr = pci_ioremap_bar(pci, 0); |
232 | #endif | ||
231 | if (!bus->remap_addr) { | 233 | if (!bus->remap_addr) { |
232 | dev_err(bus->dev, "error: ioremap error\n"); | 234 | dev_err(bus->dev, "error: ioremap error\n"); |
233 | return -ENXIO; | 235 | return -ENXIO; |
@@ -454,7 +456,9 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) | |||
454 | goto hdac_bus_unmap; | 456 | goto hdac_bus_unmap; |
455 | 457 | ||
456 | /* DSP base */ | 458 | /* DSP base */ |
459 | #if IS_ENABLED(CONFIG_PCI) | ||
457 | sdev->bar[HDA_DSP_BAR] = pci_ioremap_bar(pci, HDA_DSP_BAR); | 460 | sdev->bar[HDA_DSP_BAR] = pci_ioremap_bar(pci, HDA_DSP_BAR); |
461 | #endif | ||
458 | if (!sdev->bar[HDA_DSP_BAR]) { | 462 | if (!sdev->bar[HDA_DSP_BAR]) { |
459 | dev_err(sdev->dev, "error: ioremap error\n"); | 463 | dev_err(sdev->dev, "error: ioremap error\n"); |
460 | ret = -ENXIO; | 464 | ret = -ENXIO; |