From ef37702eb3cae2ec35d56ddd4f096cd47fec3f0d Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 30 Nov 2013 14:40:28 -0800 Subject: 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 Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/pci/probe.c') diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 38e403dddf6..173a9cf4593 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1381,8 +1381,6 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) dev->match_driver = false; ret = device_add(&dev->dev); WARN_ON(ret < 0); - - pci_proc_attach_device(dev); } struct pci_dev *__ref pci_scan_single_device(struct pci_bus *bus, int devfn) -- cgit v1.2.3-70-g09d2