powerpc/pci: Fold pcibios_setup_device() into pcibios_bus_add_device()
authorOliver O'Halloran <oohall@gmail.com>
Fri, 10 Jan 2020 07:02:03 +0000 (18:02 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Jan 2020 10:31:21 +0000 (21:31 +1100)
pcibios_bus_add_device() is the only caller of pcibios_setup_device().
Fold them together since there's no real reason to keep them separate.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200110070207.439-2-oohall@gmail.com
arch/powerpc/kernel/pci-common.c

index f8a59d7..c6c0341 100644 (file)
@@ -958,7 +958,7 @@ void pcibios_setup_bus_self(struct pci_bus *bus)
                phb->controller_ops.dma_bus_setup(bus);
 }
 
-static void pcibios_setup_device(struct pci_dev *dev)
+void pcibios_bus_add_device(struct pci_dev *dev)
 {
        struct pci_controller *phb;
        /* Fixup NUMA node as it may not be setup yet by the generic
@@ -979,15 +979,9 @@ static void pcibios_setup_device(struct pci_dev *dev)
        pci_read_irq_line(dev);
        if (ppc_md.pci_irq_fixup)
                ppc_md.pci_irq_fixup(dev);
-}
-
-void pcibios_bus_add_device(struct pci_dev *pdev)
-{
-       /* Perform platform-specific device setup */
-       pcibios_setup_device(pdev);
 
        if (ppc_md.pcibios_bus_add_device)
-               ppc_md.pcibios_bus_add_device(pdev);
+               ppc_md.pcibios_bus_add_device(dev);
 }
 
 int pcibios_add_device(struct pci_dev *dev)