diff options
author | Yijing Wang <wangyijing@huawei.com> | 2015-03-12 16:05:56 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-03-19 11:17:20 -0400 |
commit | a0c8a4d9f92d1ecd053eaa0e6cde7b4f24af97a8 (patch) | |
tree | d2146f255cc3fc4bfa18e7b5bea0cd1bbb09ae55 | |
parent | b97ea289cf6aff8d4cbcefe2b707bb9b00a73c73 (diff) |
sparc/PCI: Claim bus resources before pci_bus_add_devices()
Pci_claim_bus_resources() should be called before pci_bus_add_devices(), or
driver may failed to load, because the resources had not claimed.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | arch/sparc/kernel/pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 9ce5afe167ff..9e267cae683e 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -677,11 +677,10 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm, | |||
677 | } | 677 | } |
678 | 678 | ||
679 | pci_of_scan_bus(pbm, node, bus); | 679 | pci_of_scan_bus(pbm, node, bus); |
680 | pci_bus_add_devices(bus); | ||
681 | pci_bus_register_of_sysfs(bus); | 680 | pci_bus_register_of_sysfs(bus); |
682 | 681 | ||
683 | pci_claim_bus_resources(bus); | 682 | pci_claim_bus_resources(bus); |
684 | 683 | pci_bus_add_devices(bus); | |
685 | return bus; | 684 | return bus; |
686 | } | 685 | } |
687 | 686 | ||