Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0c8a4d9 authored by Yijing Wang's avatar Yijing Wang Committed by Bjorn Helgaas
Browse files

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: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent b97ea289
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -677,11 +677,10 @@ struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
	}

	pci_of_scan_bus(pbm, node, bus);
	pci_bus_add_devices(bus);
	pci_bus_register_of_sysfs(bus);

	pci_claim_bus_resources(bus);

	pci_bus_add_devices(bus);
	return bus;
}