Thread (37 messages) 37 messages, 5 authors, 2017-01-21

Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2017-01-10 04:26:47
Also in: lkml

On 09-01-17, 15:44, Stephen Boyd wrote:
On 12/07, Viresh Kumar wrote:
quoted
Add kref to struct dev_pm_opp for easier accounting of the OPPs.

Note that the OPPs are freed under the opp_table->lock mutex only.
I'm lost. Why add another level of krefs?
Heh. The earlier krefs were for the OPP table itself, so that it gets freed once
there are no more users of it.

The kref introduced now is for individual OPPs, so that they don't disappear
while being used and gets freed once all are done.

Also note that the OPP table will get freed only after all the OPPs are freed,
plus there are no more users left, like platform code which might have set
suppoerted-hw property.

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help