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)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 01:09:35 +0000 (01:09 +0000)
commit82bc7120308365a469f9ed0d03a61b4deb7378cb
tree767a9baf8192230fd2262afee8248510d6ce52a1
parenta224d3b887548a3e2c67f1c39b74c2ed538b67dd
PM: core: Fix device_pm_check_callbacks()

commit 157c460e10cb6eca29ccbd0f023db159d0c55ec7 upstream.

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: aa8e54b55947 (PM / sleep: Go direct_complete if driver has no callbacks)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/main.c