diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2018-05-15 11:07:00 +0200 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-05-15 13:35:37 -0500 |
commit | ae07b786888f1872ac2b63d74a17e206d441ec9f (patch) | |
tree | 1094a01ea7b467d6c36c4ed2158a211875632160 /drivers/pci | |
parent | 60cc43fc888428bb2f18f08997432d426a243338 (diff) |
PCI: Make pci_get_new_domain_nr() static
The only user of pci_get_new_domain_nr() is of_pci_bus_find_domain_nr().
Since they are defined in the same file, pci_get_new_domain_nr() can be
made static, which also simplifies preprocessor conditionals.
No functional change intended.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e597655a5643..695c2bb4e853 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5702,15 +5702,14 @@ static void pci_no_domains(void) #endif } -#ifdef CONFIG_PCI_DOMAINS +#ifdef CONFIG_PCI_DOMAINS_GENERIC static atomic_t __domain_nr = ATOMIC_INIT(-1); -int pci_get_new_domain_nr(void) +static int pci_get_new_domain_nr(void) { return atomic_inc_return(&__domain_nr); } -#ifdef CONFIG_PCI_DOMAINS_GENERIC static int of_pci_bus_find_domain_nr(struct device *parent) { static int use_dt_domains = -1; @@ -5765,7 +5764,6 @@ int pci_bus_find_domain_nr(struct pci_bus *bus, struct device *parent) acpi_pci_bus_find_domain_nr(bus); } #endif -#endif /** * pci_ext_cfg_avail - can we access extended PCI config space? |