Skip to content

Commit 06dc660

Browse files
oohalbjorn-helgaas
authored andcommitted
PCI: Rename pcibios_add_device() to pcibios_device_add()
The general convention for pcibios_* hooks is that they're named after the corresponding pci_* function they provide a hook for. The exception is pcibios_add_device() which provides a hook for pci_device_add(). Rename pcibios_add_device() to pcibios_device_add() so it matches pci_device_add(). Also, remove the export of the microblaze version. The only caller must be compiled as a built-in so there's no reason for the export. Link: https://lore.kernel.org/r/20210913152709.48013-1-oohall@gmail.com Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Niklas Schnelle <schnelle@linux.ibm.com> # s390
1 parent e4e737b commit 06dc660

File tree

9 files changed

+11
-12
lines changed

9 files changed

+11
-12
lines changed

arch/microblaze/pci/pci-common.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,13 +587,12 @@ static void pcibios_fixup_resources(struct pci_dev *dev)
587587
}
588588
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
589589

590-
int pcibios_add_device(struct pci_dev *dev)
590+
int pcibios_device_add(struct pci_dev *dev)
591591
{
592592
dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
593593

594594
return 0;
595595
}
596-
EXPORT_SYMBOL(pcibios_add_device);
597596

598597
/*
599598
* Reparent resource children of pr that conflict with res

arch/powerpc/kernel/pci-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ void pcibios_bus_add_device(struct pci_dev *dev)
10591059
ppc_md.pcibios_bus_add_device(dev);
10601060
}
10611061

1062-
int pcibios_add_device(struct pci_dev *dev)
1062+
int pcibios_device_add(struct pci_dev *dev)
10631063
{
10641064
struct irq_domain *d;
10651065

arch/powerpc/platforms/powernv/pci-sriov.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* to "new_size", calculated above. Implementing this is a convoluted process
5555
* which requires several hooks in the PCI core:
5656
*
57-
* 1. In pcibios_add_device() we call pnv_pci_ioda_fixup_iov().
57+
* 1. In pcibios_device_add() we call pnv_pci_ioda_fixup_iov().
5858
*
5959
* At this point the device has been probed and the device's BARs are sized,
6060
* but no resource allocations have been done. The SR-IOV BARs are sized

arch/s390/pci/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ static void zpci_cleanup_bus_resources(struct zpci_dev *zdev)
561561
zdev->has_resources = 0;
562562
}
563563

564-
int pcibios_add_device(struct pci_dev *pdev)
564+
int pcibios_device_add(struct pci_dev *pdev)
565565
{
566566
struct zpci_dev *zdev = to_zpci(pdev);
567567
struct resource *res;

arch/sparc/kernel/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ void pcibios_set_master(struct pci_dev *dev)
10101010
}
10111011

10121012
#ifdef CONFIG_PCI_IOV
1013-
int pcibios_add_device(struct pci_dev *dev)
1013+
int pcibios_device_add(struct pci_dev *dev)
10141014
{
10151015
struct pci_dev *pdev;
10161016

arch/x86/pci/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ static void set_dev_domain_options(struct pci_dev *pdev)
632632
pdev->hotplug_user_indicators = 1;
633633
}
634634

635-
int pcibios_add_device(struct pci_dev *dev)
635+
int pcibios_device_add(struct pci_dev *dev)
636636
{
637637
struct pci_setup_rom *rom;
638638
struct irq_domain *msidom;

drivers/pci/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,14 +2091,14 @@ void pcim_pin_device(struct pci_dev *pdev)
20912091
EXPORT_SYMBOL(pcim_pin_device);
20922092

20932093
/*
2094-
* pcibios_add_device - provide arch specific hooks when adding device dev
2094+
* pcibios_device_add - provide arch specific hooks when adding device dev
20952095
* @dev: the PCI device being added
20962096
*
20972097
* Permits the platform to provide architecture specific functionality when
20982098
* devices are added. This is the default implementation. Architecture
20992099
* implementations can override this.
21002100
*/
2101-
int __weak pcibios_add_device(struct pci_dev *dev)
2101+
int __weak pcibios_device_add(struct pci_dev *dev)
21022102
{
21032103
return 0;
21042104
}

drivers/pci/probe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@ static struct irq_domain *pci_dev_msi_domain(struct pci_dev *dev)
24502450
struct irq_domain *d;
24512451

24522452
/*
2453-
* If a domain has been set through the pcibios_add_device()
2453+
* If a domain has been set through the pcibios_device_add()
24542454
* callback, then this is the one (platform code knows best).
24552455
*/
24562456
d = dev_get_msi_domain(&dev->dev);
@@ -2518,7 +2518,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
25182518
list_add_tail(&dev->bus_list, &bus->devices);
25192519
up_write(&pci_bus_sem);
25202520

2521-
ret = pcibios_add_device(dev);
2521+
ret = pcibios_device_add(dev);
25222522
WARN_ON(ret < 0);
25232523

25242524
/* Set up MSI IRQ domain */

include/linux/pci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,7 @@ void pcibios_disable_device(struct pci_dev *dev);
21262126
void pcibios_set_master(struct pci_dev *dev);
21272127
int pcibios_set_pcie_reset_state(struct pci_dev *dev,
21282128
enum pcie_reset_state state);
2129-
int pcibios_add_device(struct pci_dev *dev);
2129+
int pcibios_device_add(struct pci_dev *dev);
21302130
void pcibios_release_device(struct pci_dev *dev);
21312131
#ifdef CONFIG_PCI
21322132
void pcibios_penalize_isa_irq(int irq, int active);

0 commit comments

Comments
 (0)