PM / runtime: Allow no callbacks in pm_runtime_force_suspend|resume()
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 16 Jan 2018 08:01:27 +0000 (09:01 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 17 Jan 2018 11:42:49 +0000 (12:42 +0100)
commit617fcb673090e495f58565ff0171d07abdad53a7
tree587b42ba0d8ac2adfdab522fe4d054372719db1b
parent1f5c6855260141ac3115e9a065491ee2ac07f9bc
PM / runtime: Allow no callbacks in pm_runtime_force_suspend|resume()

The pm_runtime_force_suspend|resume() helpers currently requires the device
to at some level (PM domain, bus, etc), have the ->runtime_suspend|resume()
callbacks assigned for it, else -ENOSYS is returned as an error.

However, there are no reason for this requirement, so let's simply remove
it by allowing these callbacks to be NULL.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/runtime.c