diff options
| author | Rafael J. Wysocki <[email protected]> | 2017-12-07 01:41:18 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2017-12-11 13:32:56 +0000 |
| commit | 3487972d7fa6c5143951436ada5933dcf0ec659d (patch) | |
| tree | e44e9769fce8d3499bf53beae6029232dd1a5d5b /net/tipc/node.c | |
| parent | Linux 4.15-rc3 (diff) | |
| download | kernel-3487972d7fa6c5143951436ada5933dcf0ec659d.tar.gz kernel-3487972d7fa6c5143951436ada5933dcf0ec659d.zip | |
PM / sleep: Avoid excess pm_runtime_enable() calls in device_resume()
Middle-layer code doing suspend-time optimizations for devices with
the DPM_FLAG_SMART_SUSPEND flag set (currently, the PCI bus type and
the ACPI PM domain) needs to make the core skip ->thaw_early and
->thaw callbacks for those devices in some cases and it sets the
power.direct_complete flag for them for this purpose.
However, it turns out that setting power.direct_complete outside of
the PM core is a bad idea as it triggers an excess invocation of
pm_runtime_enable() in device_resume().
For this reason, provide a helper to clear power.is_late_suspended
and power.is_suspended to be invoked by the middle-layer code in
question instead of setting power.direct_complete and make that code
call the new helper.
Fixes: c4b65157aeef (PCI / PM: Take SMART_SUSPEND driver flag into account)
Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account)
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Ulf Hansson <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Diffstat (limited to 'net/tipc/node.c')
0 files changed, 0 insertions, 0 deletions
