]> 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)
commitc04b1e75134ef0d471a6ad80edf76552a8e3e971
tree8ecb86974b41d863bc96629eaab3085b2156d154
parent52d25c93e5ff3b543261f6d22a24da783b15a627
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