@@ -197,21 +197,8 @@ static void _opp_table_alloc_required_tables(struct opp_table *opp_table,
197
197
required_opp_tables [i ] = _find_table_of_opp_np (required_np );
198
198
of_node_put (required_np );
199
199
200
- if (IS_ERR (required_opp_tables [i ])) {
200
+ if (IS_ERR (required_opp_tables [i ]))
201
201
lazy = true;
202
- continue ;
203
- }
204
-
205
- /*
206
- * We only support genpd's OPPs in the "required-opps" for now,
207
- * as we don't know how much about other cases. Error out if the
208
- * required OPP doesn't belong to a genpd.
209
- */
210
- if (!required_opp_tables [i ]-> is_genpd ) {
211
- dev_err (dev , "required-opp doesn't belong to genpd: %pOF\n" ,
212
- required_np );
213
- goto free_required_tables ;
214
- }
215
202
}
216
203
217
204
/* Let's do the linking later on */
@@ -379,13 +366,6 @@ static void lazy_link_required_opp_table(struct opp_table *new_table)
379
366
struct dev_pm_opp * opp ;
380
367
int i , ret ;
381
368
382
- /*
383
- * We only support genpd's OPPs in the "required-opps" for now,
384
- * as we don't know much about other cases.
385
- */
386
- if (!new_table -> is_genpd )
387
- return ;
388
-
389
369
mutex_lock (& opp_table_lock );
390
370
391
371
list_for_each_entry_safe (opp_table , temp , & lazy_opp_tables , lazy ) {
@@ -433,8 +413,7 @@ static void lazy_link_required_opp_table(struct opp_table *new_table)
433
413
434
414
/* All required opp-tables found, remove from lazy list */
435
415
if (!lazy ) {
436
- list_del (& opp_table -> lazy );
437
- INIT_LIST_HEAD (& opp_table -> lazy );
416
+ list_del_init (& opp_table -> lazy );
438
417
439
418
list_for_each_entry (opp , & opp_table -> opp_list , node )
440
419
_required_opps_available (opp , opp_table -> required_opp_count );
@@ -874,7 +853,7 @@ static struct dev_pm_opp *_opp_add_static_v2(struct opp_table *opp_table,
874
853
return ERR_PTR (- ENOMEM );
875
854
876
855
ret = _read_opp_key (new_opp , opp_table , np , & rate_not_available );
877
- if (ret < 0 && ! opp_table -> is_genpd ) {
856
+ if (ret < 0 ) {
878
857
dev_err (dev , "%s: opp key field not found\n" , __func__ );
879
858
goto free_opp ;
880
859
}
0 commit comments