Skip to content

Commit 0fc0ead

Browse files
FlyGoattsbogend
authored andcommitted
of_address: Guard of_bus_pci_get_flags with CONFIG_PCI
After 2f96593 ("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 <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Fixes: 2f96593 ("of_address: Add bus type match for pci ranges parser") Acked-by: Rob Herring <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 18641fd commit 0fc0ead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/of/address.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr)
101101
return IORESOURCE_MEM;
102102
}
103103

104+
#ifdef CONFIG_PCI
104105
static unsigned int of_bus_pci_get_flags(const __be32 *addr)
105106
{
106107
unsigned int flags = 0;
@@ -123,7 +124,6 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr)
123124
return flags;
124125
}
125126

126-
#ifdef CONFIG_PCI
127127
/*
128128
* PCI bus specific translator
129129
*/

0 commit comments

Comments
 (0)