OPP: Create separate kref for static OPPs list
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 11 Sep 2018 05:44:11 +0000 (11:14 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Sep 2018 21:56:43 +0000 (14:56 -0700)
commitd0e8ae6c26da7b9436775dfd9768d7a821ed47b7
tree49c580488e3678d30de2adb474b2dcf0d0a13329
parent0ad8c623907c27f4b8572d36c4ba73ea103e3108
OPP: Create separate kref for static OPPs list

The static OPPs don't always get freed with the OPP table, it can happen
before that as well. For example, if the OPP table is first created
using helpers like dev_pm_opp_set_supported_hw() and the OPPs are
created at a later point. Now when the OPPs are removed, the OPP table
stays until the time dev_pm_opp_put_supported_hw() is called.

Later patches will streamline the freeing of OPP table and that requires
the static OPPs to get freed with help of a separate kernel reference.
This patch prepares for that by creating a separate kref for static OPPs
list.

Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/of.c
drivers/opp/opp.h