]> git.itanic.dy.fi Git - linux-stable/commitdiff
powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code
authorPali Rohár <pali@kernel.org>
Wed, 6 Jul 2022 10:43:04 +0000 (12:43 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 27 Jul 2022 11:36:03 +0000 (21:36 +1000)
Function pci_device_from_OF_node() is used only in powermac code. So
hide it from all other platforms.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220706104308.5390-2-pali@kernel.org
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/pci_64.c

index c85f901227c976523d3a869e30e4fe17ff8bbc1f..98156932a1f50e07ef46e5cb77bc3d08f296ef97 100644 (file)
@@ -170,8 +170,10 @@ static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus)
        return bus->sysdata;
 }
 
+#ifdef CONFIG_PPC_PMAC
 extern int pci_device_from_OF_node(struct device_node *node,
                                   u8 *bus, u8 *devfn);
+#endif
 #ifndef CONFIG_PPC64
 
 extern void pci_create_OF_bus_map(void);
index 5a174936c9a0e049ebf70cb335acc3679d324d10..c3b91fb62a71b11d54f715b300002a24d29a1af3 100644 (file)
@@ -154,6 +154,7 @@ pcibios_make_OF_bus_map(void)
 }
 
 
+#ifdef CONFIG_PPC_PMAC
 /*
  * Returns the PCI device matching a given OF node
  */
@@ -193,6 +194,7 @@ int pci_device_from_OF_node(struct device_node *node, u8 *bus, u8 *devfn)
        return -ENODEV;
 }
 EXPORT_SYMBOL(pci_device_from_OF_node);
+#endif
 
 /* We create the "pci-OF-bus-map" property now so it appears in the
  * /proc device tree
index 19b03ddf563113421df759b9cb5d818f260f33e3..0c7cfb9fab04d2d53d827e177c82d4c1a0f3bc59 100644 (file)
@@ -286,6 +286,7 @@ int pcibus_to_node(struct pci_bus *bus)
 EXPORT_SYMBOL(pcibus_to_node);
 #endif
 
+#ifdef CONFIG_PPC_PMAC
 int pci_device_from_OF_node(struct device_node *np, u8 *bus, u8 *devfn)
 {
        if (!PCI_DN(np))
@@ -294,3 +295,4 @@ int pci_device_from_OF_node(struct device_node *np, u8 *bus, u8 *devfn)
        *devfn = PCI_DN(np)->devfn;
        return 0;
 }
+#endif