diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-09-13 13:09:27 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-09-19 14:56:40 -0700 |
commit | 404b1369ea26f598b96ae4d3183262a879703cfe (patch) | |
tree | df57c469958d52b0a6f1b45da07c16443f812492 /drivers/opp/opp.h | |
parent | 2fbb8670b4ff4454f1c0de510f788d737edc4b90 (diff) | |
download | linux-stable-404b1369ea26f598b96ae4d3183262a879703cfe.tar.gz linux-stable-404b1369ea26f598b96ae4d3183262a879703cfe.tar.bz2 linux-stable-404b1369ea26f598b96ae4d3183262a879703cfe.zip |
OPP: Don't try to remove all OPP tables on failure
dev_pm_opp_of_cpumask_add_table() creates the OPP table for all CPUs
present in the cpumask and on errors it should revert all changes it has
done.
It actually is doing a bit more than that. On errors, it tries to free
all the OPP tables, even the one it hasn't created yet. This may also
end up freeing the OPP tables which were created from separate path,
like dev_pm_opp_set_supported_hw().
Reported-and-tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/opp.h')
-rw-r--r-- | drivers/opp/opp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index 7c540fd063b2..a9d22aa534c3 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -196,7 +196,7 @@ struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table); void _opp_free(struct dev_pm_opp *opp); int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, struct opp_table *opp_table, bool rate_not_available); int _opp_add_v1(struct opp_table *opp_table, struct device *dev, unsigned long freq, long u_volt, bool dynamic); -void _dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask, bool of); +void _dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask, bool of, int last_cpu); struct opp_table *_add_opp_table(struct device *dev); #ifdef CONFIG_OF |