diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-05-22 14:08:08 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-05-22 14:30:10 +0300 |
commit | 878ec1a9f0e5a6b344c12fdc349ec7cb036c2a42 (patch) | |
tree | 45152b99aa4c6814d244ca9e1de8579ea75869d2 /drivers/iommu/amd_iommu_init.c | |
parent | 25419de1b8dda24f3e02478b12b724a9b0cc4e78 (diff) | |
download | linux-878ec1a9f0e5a6b344c12fdc349ec7cb036c2a42.tar.xz |
PM / OPP: Fix shared OPP table support in dev_pm_opp_set_prop_name()
It should be fine to call dev_pm_opp_set_prop_name() 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_put_prop_name() 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_set_prop_name() is called for the same OPP table,
dev_pm_opp_put_prop_name() 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 'drivers/iommu/amd_iommu_init.c')
0 files changed, 0 insertions, 0 deletions