PM / runtime: Optimize the use of device links
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 30 Oct 2016 16:32:43 +0000 (17:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 17:42:51 +0000 (11:42 -0600)
commitbaa8809f60971d10220dfe79248f54b2b265f003
tree51a4d0c63734bdd7923c025e9ed4e0dd537e3c76
parent21d5c57b3726166421251e94dabab047baaf8ce4
PM / runtime: Optimize the use of device links

If the device has no links to suppliers that should be used for
runtime PM (links with DEVICE_LINK_PM_RUNTIME set), there is no
reason to walk the list of suppliers for that device during
runtime suspend and resume.

Add a simple mechanism to detect that case and possibly avoid the
extra unnecessary overhead.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c
drivers/base/power/runtime.c
include/linux/pm.h
include/linux/pm_runtime.h