diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-04-18 18:29:30 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-04-20 10:32:15 +0200 |
commit | 107d47b2b95ef478d71f3bf36201886d7475427a (patch) | |
tree | ecd20ea7a19f73977a0c4b513939ecf34cf95c05 /drivers/base/Kconfig | |
parent | ae83d0b416db002fe95601e7f97f64b59514d936 (diff) |
PM: sleep: core: Simplify the SMART_SUSPEND flag handling
The code to handle the SMART_SUSPEND driver PM flag is hard to follow
and somewhat inconsistent with respect to devices without middle-layer
(subsystem) callbacks.
Namely, for those devices the core takes the role of a middle layer
in providing the expected ordering of execution of callbacks (under
the assumption that the drivers setting SMART_SUSPEND can reuse their
PM-runtime callbacks directly for system-wide suspend). To that end,
it prevents driver ->suspend_late and ->suspend_noirq callbacks from
being executed for devices that are still runtime-suspended in
__device_suspend_late(), because running the same callback funtion
that was previously run by PM-runtime for them may be invalid.
However, it does that only for devices without any middle-layer
callbacks for the late/noirq/early suspend/resume phases even
though it would be simpler and more consistent to skip the
driver-lavel callbacks for all devices with SMART_SUSPEND set
that are runtime-suspended in __device_suspend_late().
Simplify the code in accordance with the above observation.
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Diffstat (limited to 'drivers/base/Kconfig')
0 files changed, 0 insertions, 0 deletions