[PATCH] Fix compile problem without CONFIG_PCI

Li Yang leoli at freescale.com
Wed Aug 23 16:13:08 EST 2006


Compile fails without defining CONFIG_PCI.  
The patch fix this.

Signed-off-by: Li Yang <leoli at freescale.com>
---

arch/powerpc/kernel/prom_parse.c |    5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 6a7e997..f460b7d 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -598,10 +598,12 @@ static struct device_node *of_irq_find_p
    return p;
}

+#ifdef CONFIG_PCI
static u8 of_irq_pci_swizzle(u8 slot, u8 pin)
{
    return (((pin - 1) + slot) % 4) + 1;
}
+#endif

/* This doesn't need to be called if you don't have any special workaround
 * flags to pass
@@ -891,6 +893,7 @@ int of_irq_map_one(struct device_node *d
}
EXPORT_SYMBOL_GPL(of_irq_map_one);

+#ifdef CONFIG_PCI
int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
{
    struct device_node *dn, *ppnode;
@@ -967,4 +970,4 @@ #endif
    return of_irq_map_raw(ppnode, &lspec, laddr, out_irq);
}
EXPORT_SYMBOL_GPL(of_irq_map_pci);
-
+#endif





More information about the Linuxppc-dev mailing list