diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-01-21 16:20:52 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-25 18:22:37 -0500 |
commit | 4f535093cf8f6da8cfda7c36c2c1ecd2e9586ee4 (patch) | |
tree | 62bf63646dc1c6870c5520b15d0f17aa09e05db5 /drivers/pci/pci.h | |
parent | 58d9a38f6facb28e935ec2747f6d9e9bf4684118 (diff) |
PCI: Put pci_dev in device tree as early as possible
We want to put pci_dev structs in the device tree as soon as possible so
for_each_pci_dev() iteration will not miss them, but driver attachment
needs to be delayed until after pci_assign_unassigned_resources() to make
sure all devices have resources assigned first.
This patch moves device registering from pci_bus_add_devices() to
pci_device_add(), which happens earlier, leaving driver attachment in
pci_bus_add_devices().
It also removes unattached child bus handling in pci_bus_add_devices().
That's not needed because child bus via pci_add_new_bus() is already
in parent bus children list.
[bhelgaas: changelog]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index adfd172c5b9b..d295e7b0e64f 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -203,7 +203,6 @@ extern int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
203 | struct resource *res, unsigned int reg); | 203 | struct resource *res, unsigned int reg); |
204 | extern int pci_resource_bar(struct pci_dev *dev, int resno, | 204 | extern int pci_resource_bar(struct pci_dev *dev, int resno, |
205 | enum pci_bar_type *type); | 205 | enum pci_bar_type *type); |
206 | extern int pci_bus_add_child(struct pci_bus *bus); | ||
207 | extern void pci_enable_ari(struct pci_dev *dev); | 206 | extern void pci_enable_ari(struct pci_dev *dev); |
208 | /** | 207 | /** |
209 | * pci_ari_enabled - query ARI forwarding status | 208 | * pci_ari_enabled - query ARI forwarding status |