diff options
author | Tomasz Nowicki <tn@semihalf.com> | 2016-06-10 15:55:14 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-10 19:28:12 -0400 |
commit | 9c7cb891ecfea3b88e4fa255afeec0da84ea6a86 (patch) | |
tree | b873f884250bc730ffb4dd7729beab4ae63b5a18 /drivers/pci/pci.c | |
parent | 935c760ec8101413248da23b6df45f0a7a643c62 (diff) |
PCI: Refactor pci_bus_assign_domain_nr() for CONFIG_PCI_DOMAINS_GENERIC
Instead of assigning bus->domain_nr inside pci_bus_assign_domain_nr(),
return the domain and let the caller do the assignment. Rename
pci_bus_assign_domain_nr() to pci_bus_find_domain_nr() to reflect this.
No functional change intended.
[bhelgaas: changelog]
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index eb431b5c3685..b9a783385eae 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -4941,7 +4941,7 @@ int pci_get_new_domain_nr(void) | |||
4941 | } | 4941 | } |
4942 | 4942 | ||
4943 | #ifdef CONFIG_PCI_DOMAINS_GENERIC | 4943 | #ifdef CONFIG_PCI_DOMAINS_GENERIC |
4944 | void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent) | 4944 | int pci_bus_find_domain_nr(struct pci_bus *bus, struct device *parent) |
4945 | { | 4945 | { |
4946 | static int use_dt_domains = -1; | 4946 | static int use_dt_domains = -1; |
4947 | int domain = -1; | 4947 | int domain = -1; |
@@ -4985,7 +4985,7 @@ void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent) | |||
4985 | domain = -1; | 4985 | domain = -1; |
4986 | } | 4986 | } |
4987 | 4987 | ||
4988 | bus->domain_nr = domain; | 4988 | return domain; |
4989 | } | 4989 | } |
4990 | #endif | 4990 | #endif |
4991 | #endif | 4991 | #endif |