diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-05-22 16:38:08 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-05-22 17:00:10 +0530 |
commit | 5019acc693d3183a19d4844f6e2d878ea2dd7ddd (patch) | |
tree | fce13dc6915eb4d50a091a3c0802a86f8b498f8d /lib/ratelimit.c | |
parent | 779b783cfaa726cbe35317ae2c1968c5496a3a03 (diff) |
PM / OPP: Fix shared OPP table support in dev_pm_opp_register_set_opp_helper()
It should be fine to call dev_pm_opp_register_set_opp_helper() for all
possible CPUs, even if some of them share the OPP table as the caller
may not be aware of sharing policy.
Lets increment the reference count of the OPP table and return its
pointer. The caller need to call dev_pm_opp_register_put_opp_helper()
the same number of times later on to drop all the references.
To avoid adding another counter to count how many times
dev_pm_opp_register_set_opp_helper() is called for the same OPP table,
dev_pm_opp_register_put_opp_helper() frees the resources on the very
first call made to it, assuming that the caller would be calling it
sequentially for all the CPUs. We can revisit that if that assumption is
broken in the future.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'lib/ratelimit.c')
0 files changed, 0 insertions, 0 deletions