OPP: Don't take OPP table's kref for static OPPs
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 2 Aug 2018 08:53:09 +0000 (14:23 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Sep 2018 21:56:43 +0000 (14:56 -0700)
commit0ad8c623907c27f4b8572d36c4ba73ea103e3108
treea1b07e008c81b305890d87311ea3604776254118
parentf06ed90e7051a3a50c2172001c86ff9645e5c2ba
OPP: Don't take OPP table's kref for static OPPs

The reference count is only required to be incremented for every call
that may lead to adding the OPP table. For static OPPs the same should
be done from the parent routine which adds all static OPPs together and
so only one refcount for all static OPPs.

Update code to reflect that.

The refcount is incremented every time a dynamic OPP is created (as that
can lead to creating the OPP table) and the same is dropped when the OPP
is removed.

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