Hi! > Rename two functions and rearrange code in drivers/pci/pci-driver.c > so that it's easier to follow. In particular, separate invocations > of the legacy callbacks from the rest of the new callbacks' code. > > No functional changes should result from this. > > Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> > --- > drivers/pci/pci-driver.c | 104 +++++++++++++++++++++++++++++------------------ > 1 file changed, 65 insertions(+), 39 deletions(-) > > @@ -504,17 +504,21 @@ static int pci_pm_suspend(struct device > struct device_driver *drv = dev->driver; > int error = 0; > > + if (pci_has_legacy_pm_support(pci_dev)) { > + error = pci_legacy_suspend(dev, PMSG_SUSPEND); > + goto Exit; > + } > + > if (drv && drv->pm) { > if (drv->pm->suspend) { > error = drv->pm->suspend(dev); > suspend_report_result(drv->pm->suspend, error); > } > - } else if (pci_has_legacy_pm_support(pci_dev)) { > - error = pci_legacy_suspend(dev, PMSG_SUSPEND); > } else { > pci_pm_default_suspend(pci_dev); > } > Does this mean that pci_has_legacy_pm_support() => !(drv && drv->pm) ? Should pci_has_legacy_pm_support() check for that and WARN() in case both sets of callbacks are set? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html