Lines 443-453
static void pci_pm_default_suspend_gener
Link Here
|
443 |
pci_save_state(pci_dev); |
443 |
pci_save_state(pci_dev); |
444 |
} |
444 |
} |
445 |
|
445 |
|
446 |
static void pci_pm_default_suspend(struct pci_dev *pci_dev) |
446 |
static void pci_pm_default_suspend(struct pci_dev *pci_dev, bool prepare) |
447 |
{ |
447 |
{ |
448 |
pci_pm_default_suspend_generic(pci_dev); |
448 |
pci_pm_default_suspend_generic(pci_dev); |
449 |
|
449 |
|
450 |
if (!pci_is_bridge(pci_dev)) |
450 |
if (prepare && !pci_is_bridge(pci_dev)) |
451 |
pci_prepare_to_sleep(pci_dev); |
451 |
pci_prepare_to_sleep(pci_dev); |
452 |
|
452 |
|
453 |
pci_fixup_device(pci_fixup_suspend, pci_dev); |
453 |
pci_fixup_device(pci_fixup_suspend, pci_dev); |
Lines 507-513
static int pci_pm_suspend(struct device
Link Here
|
507 |
} |
507 |
} |
508 |
|
508 |
|
509 |
if (!error) |
509 |
if (!error) |
510 |
pci_pm_default_suspend(pci_dev); |
510 |
pci_pm_default_suspend(pci_dev, drv && drv->pm); |
511 |
|
511 |
|
512 |
return error; |
512 |
return error; |
513 |
} |
513 |
} |
Lines 666-672
static int pci_pm_poweroff(struct device
Link Here
|
666 |
} |
666 |
} |
667 |
|
667 |
|
668 |
if (!error) |
668 |
if (!error) |
669 |
pci_pm_default_suspend(pci_dev); |
669 |
pci_pm_default_suspend(pci_dev, drv && drv->pm); |
670 |
|
670 |
|
671 |
return error; |
671 |
return error; |
672 |
} |
672 |
} |