diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-11-30 23:40:28 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-12-18 21:53:38 +0100 |
commit | ef37702eb3cae2ec35d56ddd4f096cd47fec3f0d (patch) | |
tree | e63a77a09c38648f8dfb14db02499183e1b77568 /drivers/pci/bus.c | |
parent | PCI: Use device_release_driver() in pci_stop_root_bus() (diff) | |
download | linux-ef37702eb3cae2ec35d56ddd4f096cd47fec3f0d.tar.xz linux-ef37702eb3cae2ec35d56ddd4f096cd47fec3f0d.zip |
PCI: Move pci_proc_attach_device() to pci_bus_add_device()
4f535093cf8f ("PCI: Put pci_dev in device tree as early as possible")
moved pci_proc_attach_device() from pci_bus_add_device() to
pci_device_add().
This moves it back to pci_bus_add_device(), essentially reverting that
part of 4f535093cf8f. This makes it symmetric with pci_stop_dev(),
where we call pci_proc_detach_device() and pci_remove_sysfs_dev_files()
and set dev->is_added = 0.
[bhelgaas: changelog, create sysfs then attach proc for symmetry]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index fc1b74013743..a037d81f21ed 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -176,6 +176,7 @@ int pci_bus_add_device(struct pci_dev *dev) */ pci_fixup_device(pci_fixup_final, dev); pci_create_sysfs_dev_files(dev); + pci_proc_attach_device(dev); dev->match_driver = true; retval = device_attach(&dev->dev); |