Commit d55c4a76 authored by Li Yang's avatar Li Yang Committed by Paul Mackerras

[POWERPC] Fix compile problem without CONFIG_PCI

Compile fails without defining CONFIG_PCI.
The patch fix this.

[paulus@samba.org: Moved of_irq_pci_swizzle so we only need one #ifdef]
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 87589f08
...@@ -598,11 +598,6 @@ static struct device_node *of_irq_find_parent(struct device_node *child) ...@@ -598,11 +598,6 @@ static struct device_node *of_irq_find_parent(struct device_node *child)
return p; return p;
} }
static u8 of_irq_pci_swizzle(u8 slot, u8 pin)
{
return (((pin - 1) + slot) % 4) + 1;
}
/* This doesn't need to be called if you don't have any special workaround /* This doesn't need to be called if you don't have any special workaround
* flags to pass * flags to pass
*/ */
...@@ -891,6 +886,12 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq ...@@ -891,6 +886,12 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
} }
EXPORT_SYMBOL_GPL(of_irq_map_one); EXPORT_SYMBOL_GPL(of_irq_map_one);
#ifdef CONFIG_PCI
static u8 of_irq_pci_swizzle(u8 slot, u8 pin)
{
return (((pin - 1) + slot) % 4) + 1;
}
int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
{ {
struct device_node *dn, *ppnode; struct device_node *dn, *ppnode;
...@@ -967,4 +968,4 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) ...@@ -967,4 +968,4 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
return of_irq_map_raw(ppnode, &lspec, laddr, out_irq); return of_irq_map_raw(ppnode, &lspec, laddr, out_irq);
} }
EXPORT_SYMBOL_GPL(of_irq_map_pci); EXPORT_SYMBOL_GPL(of_irq_map_pci);
#endif /* CONFIG_PCI */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment