File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -403,20 +403,16 @@ static int load_one_timing_from_dt(struct tegra_clk_emc *tegra,
403
403
}
404
404
405
405
timing -> parent_index = 0xff ;
406
- for (i = 0 ; i < ARRAY_SIZE (emc_parent_clk_names ); i ++ ) {
407
- if (!strcmp (emc_parent_clk_names [i ],
408
- __clk_get_name (timing -> parent ))) {
409
- timing -> parent_index = i ;
410
- break ;
411
- }
412
- }
413
- if (timing -> parent_index == 0xff ) {
406
+ i = match_string (emc_parent_clk_names , ARRAY_SIZE (emc_parent_clk_names ),
407
+ __clk_get_name (timing -> parent ));
408
+ if (i < 0 ) {
414
409
pr_err ("timing %pOF: %s is not a valid parent\n" ,
415
410
node , __clk_get_name (timing -> parent ));
416
411
clk_put (timing -> parent );
417
412
return - EINVAL ;
418
413
}
419
414
415
+ timing -> parent_index = i ;
420
416
return 0 ;
421
417
}
422
418
You can’t perform that action at this time.
0 commit comments