On Tue, Jan 15, 2013 at 6:29 PM, Yijing Wang <wangyijing@xxxxxxxxxx> wrote: > On 2013/1/12 6:40, Yinghai Lu wrote: >> Move out device registering out of pci_bus_add_devices, so we could >> put new created pci devices in device tree early. >> >> new pci_bus_add_devices will do the device_attach work to load pci drivers >> instead. >> >> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx> >> --- >> drivers/pci/bus.c | 47 +++-------------------------------------------- >> drivers/pci/iov.c | 7 ------- >> drivers/pci/probe.c | 34 +++++++++++++++++++++++++++------- >> 3 files changed, 30 insertions(+), 58 deletions(-) >> >> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c >> index 1f5916a..0a55845 100644 >> --- a/drivers/pci/bus.c >> +++ b/drivers/pci/bus.c >> @@ -178,22 +178,9 @@ static void pci_bus_attach_device(struct pci_dev *dev) >> */ >> int pci_bus_add_device(struct pci_dev *dev) >> { >> - int retval; >> - >> - pci_fixup_device(pci_fixup_final, dev); >> - >> - retval = pcibios_add_device(dev); >> - if (retval) >> - return retval; >> - >> - retval = device_add(&dev->dev); >> - if (retval) >> - return retval; >> - >> pci_bus_attach_device(dev); >> dev->is_added = 1; >> - pci_proc_attach_device(dev); >> - pci_create_sysfs_dev_files(dev); >> + >> return 0; >> } > > > Hi Yinghai, > Should change pci_bus_add_device() function to void return now? So some unnecessary ret check can remove. > yeah, maybe later. this patch is already some kind of big now. also there is outside caller... drivers/edac/i82875p_edac.c: err = pci_bus_add_device(dev); drivers/platform/x86/asus-wmi.c: if (pci_bus_add_device(dev)) drivers/platform/x86/eeepc-laptop.c: if (pci_bus_add_device(dev)) so let change that later. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html