File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1553,7 +1553,7 @@ static void _opp_kref_release(struct kref *kref)
1553
1553
* frequency/voltage list.
1554
1554
*/
1555
1555
blocking_notifier_call_chain (& opp_table -> head , OPP_EVENT_REMOVE , opp );
1556
- _of_opp_free_required_opps (opp_table , opp );
1556
+ _of_clear_opp (opp_table , opp );
1557
1557
opp_debug_remove_one (opp );
1558
1558
kfree (opp );
1559
1559
}
Original file line number Diff line number Diff line change @@ -254,8 +254,8 @@ void _of_clear_opp_table(struct opp_table *opp_table)
254
254
* Release all resources previously acquired with a call to
255
255
* _of_opp_alloc_required_opps().
256
256
*/
257
- void _of_opp_free_required_opps (struct opp_table * opp_table ,
258
- struct dev_pm_opp * opp )
257
+ static void _of_opp_free_required_opps (struct opp_table * opp_table ,
258
+ struct dev_pm_opp * opp )
259
259
{
260
260
struct dev_pm_opp * * required_opps = opp -> required_opps ;
261
261
int i ;
@@ -275,6 +275,12 @@ void _of_opp_free_required_opps(struct opp_table *opp_table,
275
275
kfree (required_opps );
276
276
}
277
277
278
+ void _of_clear_opp (struct opp_table * opp_table , struct dev_pm_opp * opp )
279
+ {
280
+ _of_opp_free_required_opps (opp_table , opp );
281
+ of_node_put (opp -> np );
282
+ }
283
+
278
284
/* Populate all required OPPs which are part of "required-opps" list */
279
285
static int _of_opp_alloc_required_opps (struct opp_table * opp_table ,
280
286
struct dev_pm_opp * opp )
@@ -938,7 +944,7 @@ static struct dev_pm_opp *_opp_add_static_v2(struct opp_table *opp_table,
938
944
939
945
new_opp -> turbo = of_property_read_bool (np , "turbo-mode" );
940
946
941
- new_opp -> np = np ;
947
+ new_opp -> np = of_node_get ( np ) ;
942
948
new_opp -> dynamic = false;
943
949
new_opp -> available = true;
944
950
Original file line number Diff line number Diff line change @@ -267,14 +267,12 @@ static inline bool lazy_linking_pending(struct opp_table *opp_table)
267
267
void _of_init_opp_table (struct opp_table * opp_table , struct device * dev , int index );
268
268
void _of_clear_opp_table (struct opp_table * opp_table );
269
269
struct opp_table * _managed_opp (struct device * dev , int index );
270
- void _of_opp_free_required_opps (struct opp_table * opp_table ,
271
- struct dev_pm_opp * opp );
270
+ void _of_clear_opp (struct opp_table * opp_table , struct dev_pm_opp * opp );
272
271
#else
273
272
static inline void _of_init_opp_table (struct opp_table * opp_table , struct device * dev , int index ) {}
274
273
static inline void _of_clear_opp_table (struct opp_table * opp_table ) {}
275
274
static inline struct opp_table * _managed_opp (struct device * dev , int index ) { return NULL ; }
276
- static inline void _of_opp_free_required_opps (struct opp_table * opp_table ,
277
- struct dev_pm_opp * opp ) {}
275
+ static inline void _of_clear_opp (struct opp_table * opp_table , struct dev_pm_opp * opp ) {}
278
276
#endif
279
277
280
278
#ifdef CONFIG_DEBUG_FS
You can’t perform that action at this time.
0 commit comments