aboutsummaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-09-12 12:35:19 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-09-19 14:56:46 -0700
commitcdd6ed90cdb6c2fd982909501f0a109274147fb4 (patch)
tree353be38edd20f6a6045244801cd6597ceb5caf87 /.clang-format
parentOPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table() (diff)
downloadlinux-dev-cdd6ed90cdb6c2fd982909501f0a109274147fb4.tar.xz
linux-dev-cdd6ed90cdb6c2fd982909501f0a109274147fb4.zip
OPP: Use a single mechanism to free the OPP table
Currently there are two separate ways to free the OPP table based on how it is created in the first place. We call _dev_pm_opp_remove_table() to free the static and/or dynamic OPP, OPP list devices, etc. This is done for the case where the OPP table is added while initializing the OPPs, like via the path dev_pm_opp_of_add_table(). We also call dev_pm_opp_put_opp_table() in some cases which eventually frees the OPP table structure once the reference count reaches 0. This is used by the first case as well as other cases like dev_pm_opp_set_regulators() where the OPPs aren't necessarily initialized at this point. This whole thing is a bit unclear and messy and obstruct any further cleanup/fixup of OPP core. This patch tries to streamline this by keeping a single path for OPP table destruction, i.e. dev_pm_opp_put_opp_table(). All the cleanup happens in _opp_table_kref_release() now after the reference count reaches 0. _dev_pm_opp_remove_table() is removed as it isn't required anymore. We don't drop the reference to the OPP table after creating it from _of_add_opp_table_v{1|2}() anymore and the same is dropped only when we try to remove them. Tested-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions