]> git.baikalelectronics.ru Git - kernel.git/commit
PM: suspend: Use valid_state() consistently
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 22 Oct 2021 15:53:43 +0000 (17:53 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 26 Oct 2021 13:52:58 +0000 (15:52 +0200)
commitce32eb563bd0f97b2d50369e07be3046d0100c94
tree8ecb86974b41d863bc96629eaab3085b2156d154
parent4df1e0743e4e16a29fa6466dbf4135df8e86ac88
PM: suspend: Use valid_state() consistently

Make valid_state() check if the ->enter callback is present in
suspend_ops (only PM_SUSPEND_TO_IDLE can be valid otherwise) and
make sleep_state_supported() call valid_state() consistently to
validate the states other than PM_SUSPEND_TO_IDLE.

While at it, clean up the comment in valid_state().

No expected functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/suspend.c