diff options
author | Liang He <windhl@126.com> | 2022-07-18 21:36:32 +0800 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2022-07-19 11:07:02 +0530 |
commit | 3466ea2cd6b66e4647a9af2381c0d0cd3d579354 (patch) | |
tree | 1e673682efbb6b56767bc25de157eea3553f18b4 /drivers/opp/opp.h | |
parent | ce736cf71b5ab8ad9b741dc7a4a07e41c27d1421 (diff) |
OPP: Don't drop opp->np reference while it is still in use
The struct dev_pm_opp contains a reference of the DT node, opp->np,
throughout its lifetime. We should increase the refcount for the same
from _opp_add_static_v2(), and drop it while removing the OPP finally.
Signed-off-by: Liang He <windhl@126.com>
[ Viresh: Updated subject / commit log, create _of_clear_opp() and drop
reference from it]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/opp.h')
-rw-r--r-- | drivers/opp/opp.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index 816009eaafee..3a6e077df386 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -267,14 +267,12 @@ static inline bool lazy_linking_pending(struct opp_table *opp_table) void _of_init_opp_table(struct opp_table *opp_table, struct device *dev, int index); void _of_clear_opp_table(struct opp_table *opp_table); struct opp_table *_managed_opp(struct device *dev, int index); -void _of_opp_free_required_opps(struct opp_table *opp_table, - struct dev_pm_opp *opp); +void _of_clear_opp(struct opp_table *opp_table, struct dev_pm_opp *opp); #else static inline void _of_init_opp_table(struct opp_table *opp_table, struct device *dev, int index) {} static inline void _of_clear_opp_table(struct opp_table *opp_table) {} static inline struct opp_table *_managed_opp(struct device *dev, int index) { return NULL; } -static inline void _of_opp_free_required_opps(struct opp_table *opp_table, - struct dev_pm_opp *opp) {} +static inline void _of_clear_opp(struct opp_table *opp_table, struct dev_pm_opp *opp) {} #endif #ifdef CONFIG_DEBUG_FS |