Commit 31eb7431 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

PM / runtime: Fix handling of suppliers with disabled runtime PM

Prevent rpm_get_suppliers() from returning an error code if runtime
PM is disabled for one or more of the supplier devices it wants to
runtime-resume, so as to make runtime PM work for devices with links
to suppliers that don't use runtime PM (such links may be created
during device enumeration even before it is known whether or not
runtime PM will be enabled for the devices in question, for example).

Fixes: 21d5c57b (PM / runtime: Use device links)
Reported-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>
Tested-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
parent ae64f9bd
...@@ -276,7 +276,8 @@ static int rpm_get_suppliers(struct device *dev) ...@@ -276,7 +276,8 @@ static int rpm_get_suppliers(struct device *dev)
continue; continue;
retval = pm_runtime_get_sync(link->supplier); retval = pm_runtime_get_sync(link->supplier);
if (retval < 0) { /* Ignore suppliers with disabled runtime PM. */
if (retval < 0 && retval != -EACCES) {
pm_runtime_put_noidle(link->supplier); pm_runtime_put_noidle(link->supplier);
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment