mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 23:51:37 +00:00
PM: domains: Fix domain attach for CONFIG_PM_OPP=n
If CONFIG_PM_OPP=n, of_get_required_opp_performance_state() always
returns -EOPNOTSUPP, and all drivers for devices that are part of a PM
Domain fail to probe with:
failed to set required performance state for power-domain foo: -95
probe of bar failed with error -95
Fix this by treating -EOPNOTSUPP the same as -ENODEV.
Fixes: c016baf7dc
("PM: domains: Add support for 'required-opps' to set default perf state")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
80d4a82e1d
commit
656164181e
@ -2689,7 +2689,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device *base_dev,
|
|||||||
|
|
||||||
/* Set the default performance state */
|
/* Set the default performance state */
|
||||||
pstate = of_get_required_opp_performance_state(dev->of_node, index);
|
pstate = of_get_required_opp_performance_state(dev->of_node, index);
|
||||||
if (pstate < 0 && pstate != -ENODEV) {
|
if (pstate < 0 && pstate != -ENODEV && pstate != -EOPNOTSUPP) {
|
||||||
ret = pstate;
|
ret = pstate;
|
||||||
goto err;
|
goto err;
|
||||||
} else if (pstate > 0) {
|
} else if (pstate > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user