Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PNP: Fix compile error in quirks.c

Fix the compile error:

drivers/pnp/quirks.c:393:2: error: implicit declaration of function 'pcibios_bus_to_resource'

that occurs when building with CONFIG_PCI unset. The quirk is only
relevent to Intel devices, so we could use "#if defined(CONFIG_X86) &&
defined(CONFIG_PCI)" instead, but testing CONFIG_X86 is not strictly
necessary.

Fixes: cb171f7abb9a (PNP: Work around BIOS defects in Intel MCH area reporting)
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Bjorn Helgaas and committed by
Rafael J. Wysocki
b3413afb d1db0eea

+2 -2
+2 -2
drivers/pnp/quirks.c
··· 335 335 } 336 336 #endif 337 337 338 - #ifdef CONFIG_X86 338 + #ifdef CONFIG_PCI 339 339 /* Device IDs of parts that have 32KB MCH space */ 340 340 static const unsigned int mch_quirk_devices[] = { 341 341 0x0154, /* Ivy Bridge */ ··· 440 440 #ifdef CONFIG_AMD_NB 441 441 {"PNP0c01", quirk_amd_mmconfig_area}, 442 442 #endif 443 - #ifdef CONFIG_X86 443 + #ifdef CONFIG_PCI 444 444 {"PNP0c02", quirk_intel_mch}, 445 445 #endif 446 446 {""}