of_address: Guard of_bus_pci_get_flags with CONFIG_PCI

After 2f96593ecc ("of_address: Add bus type match for pci ranges parser"),
the last user of of_bus_pci_get_flags when CONFIG_PCI is disabled had gone.

This caused unused function warning when compiling without CONFIG_PCI.
Fix by guarding it with CONFIG_PCI.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 2f96593ecc ("of_address: Add bus type match for pci ranges parser")
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
Jiaxun Yang 2020-07-30 08:56:14 +08:00 committed by Thomas Bogendoerfer
parent 18641fd9fa
commit 0fc0ead348

View File

@ -101,6 +101,7 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr)
return IORESOURCE_MEM; return IORESOURCE_MEM;
} }
#ifdef CONFIG_PCI
static unsigned int of_bus_pci_get_flags(const __be32 *addr) static unsigned int of_bus_pci_get_flags(const __be32 *addr)
{ {
unsigned int flags = 0; unsigned int flags = 0;
@ -123,7 +124,6 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr)
return flags; return flags;
} }
#ifdef CONFIG_PCI
/* /*
* PCI bus specific translator * PCI bus specific translator
*/ */