[POWERPC] fix building without PCI
authorArnd Bergmann <arnd@arndb.de>
Mon, 27 Nov 2006 18:19:00 +0000 (19:19 +0100)
committerPaul Mackerras <paulus@samba.org>
Mon, 4 Dec 2006 09:41:21 +0000 (20:41 +1100)
At least the ide driver calls pcibus_to_node, which is not
defined when CONFIG_PCI is disabled. This adds a nop function
for the !PCI case.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
include/asm-powerpc/topology.h

index 9fe7894..50c0140 100644 (file)
@@ -32,7 +32,14 @@ static inline int node_to_first_cpu(int node)
 int of_node_to_nid(struct device_node *device);
 
 struct pci_bus;
+#ifdef CONFIG_PCI
 extern int pcibus_to_node(struct pci_bus *bus);
+#else
+static inline int pcibus_to_node(struct pci_bus *bus)
+{
+       return -1;
+}
+#endif
 
 #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
                                        CPU_MASK_ALL : \