device parallel resume support for PCI devices Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx> --- drivers/pci/bus.c | 4 ++++ drivers/pci/remove.c | 2 ++ 2 files changed, 6 insertions(+) Index: linux-2.6/drivers/pci/bus.c =================================================================== --- linux-2.6.orig/drivers/pci/bus.c +++ linux-2.6/drivers/pci/bus.c @@ -85,6 +85,10 @@ int pci_bus_add_device(struct pci_dev *d return retval; dev->is_added = 1; + + /* parallel resume for pci devices on bus 0 */ + if (dev->bus->number == 0) + device_parallel_resume_register(&dev->dev, 1); pci_proc_attach_device(dev); pci_create_sysfs_dev_files(dev); return 0; Index: linux-2.6/drivers/pci/remove.c =================================================================== --- linux-2.6.orig/drivers/pci/remove.c +++ linux-2.6/drivers/pci/remove.c @@ -92,6 +92,8 @@ EXPORT_SYMBOL(pci_remove_bus); */ void pci_remove_bus_device(struct pci_dev *dev) { + if (dev->bus->number == 0 && dev->dev.resumed) + device_parallel_resume_unregister(&dev->dev); if (dev->subordinate) { struct pci_bus *b = dev->subordinate; _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm