]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Domains: Allow no domain-idle-states DT property in genpd when parsing
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 Mar 2020 10:40:23 +0000 (11:40 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 14 Mar 2020 11:03:05 +0000 (12:03 +0100)
commite480fb12d832d83f5b6e3edeb4da937e1c3185f2
tree81ce75e68ae460729df12f0d0eecfe055cd5641d
parentc60a8cd31b97a8e7dededd29dfc7803b6a28a358
PM / Domains: Allow no domain-idle-states DT property in genpd when parsing

Commit d5b7b6335d28 ("PM / Domains: Don't treat zero found compatible idle
states as an error"), moved of_genpd_parse_idle_states() towards allowing
none compatible idle state to be found for the device node, rather than
returning an error code.

However, it didn't consider that the "domain-idle-states" DT property may
be missing as it's optional, which makes of_count_phandle_with_args() to
return -ENOENT. Let's fix this to make the behaviour consistent.

Fixes: d5b7b6335d28 ("PM / Domains: Don't treat zero found compatible idle states as an error")
Reported-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Cc: 4.20+ <stable@vger.kernel.org> # 4.20+
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c