]> git.baikalelectronics.ru Git - kernel.git/commit
PM: core: Fix device_pm_check_callbacks()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Sep 2017 00:22:39 +0000 (02:22 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Sep 2017 20:58:27 +0000 (22:58 +0200)
commit4ee8a9cae5aa1a31c52e4e5ef2331bc3cf36f244
tree06c2ceb8529ac64bf6e90ea315fe261ec989883e
parent2018862bdad13479b663e0e9615d7c6fcaa89285
PM: core: Fix device_pm_check_callbacks()

The device_pm_check_callbacks() function doesn't check legacy
->suspend and ->resume callback pointers under the device's
bus type, class and driver, so in some cases it may set the
no_pm_callbacks flag for the device incorrectly and then the
callbacks may be skipped during system suspend/resume, which
shouldn't happen.

Fixes: bab80490b84c (PM / sleep: Go direct_complete if driver has no callbacks)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 4.5+ <stable@vger.kernel.org> # 4.5+
drivers/base/power/main.c