]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Fix compile problem without CONFIG_PCI
authorLi Yang <leoli@freescale.com>
Wed, 23 Aug 2006 06:13:08 +0000 (14:13 +0800)
committerPaul Mackerras <paulus@samba.org>
Wed, 23 Aug 2006 07:12:33 +0000 (17:12 +1000)
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: Li Yang <leoli@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/prom_parse.c

index 6a7e997c401d8ea81cbbf5e3259927c0875000c5..11052c212ad5d97388e8e757c853d757dd393fe9 100644 (file)
@@ -598,11 +598,6 @@ static struct device_node *of_irq_find_parent(struct device_node *child)
        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
  * flags to pass
  */
@@ -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);
 
+#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)
 {
        struct device_node *dn, *ppnode;
@@ -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);
 }
 EXPORT_SYMBOL_GPL(of_irq_map_pci);
-
+#endif /* CONFIG_PCI */