Commit 0cebf7cb authored by Ulf Hansson's avatar Ulf Hansson

pmdomain: core: Don't clear suspended_count at genpd_prepare()

There is no longer any need to clear genpd->suspended_count in
genpd_prepare(), as it should be correctly incremented and decremented for
all cases. In fact, if the counter isn't correctly managed we would be
hiding a problem that we shouldn't. Therefore, let's not clear it.
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20240412104208.74361-2-ulf.hansson@linaro.org
parent 5af7f593
...@@ -1255,10 +1255,7 @@ static int genpd_prepare(struct device *dev) ...@@ -1255,10 +1255,7 @@ static int genpd_prepare(struct device *dev)
return -EINVAL; return -EINVAL;
genpd_lock(genpd); genpd_lock(genpd);
genpd->prepared_count++;
if (genpd->prepared_count++ == 0)
genpd->suspended_count = 0;
genpd_unlock(genpd); genpd_unlock(genpd);
ret = pm_generic_prepare(dev); ret = pm_generic_prepare(dev);
......
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