@@ -1013,60 +1013,6 @@ unsigned int of_get_required_opp_performance_state(struct device_node *np,
1013
1013
}
1014
1014
EXPORT_SYMBOL_GPL (of_get_required_opp_performance_state );
1015
1015
1016
- /**
1017
- * of_dev_pm_opp_find_required_opp() - Search for required OPP.
1018
- * @dev: The device whose OPP node is referenced by the 'np' DT node.
1019
- * @np: Node that contains the "required-opps" property.
1020
- *
1021
- * Returns the OPP of the device 'dev', whose phandle is present in the "np"
1022
- * node. Although the "required-opps" property supports having multiple
1023
- * phandles, this helper routine only parses the very first phandle in the list.
1024
- *
1025
- * Return: Matching opp, else returns ERR_PTR in case of error and should be
1026
- * handled using IS_ERR.
1027
- *
1028
- * The callers are required to call dev_pm_opp_put() for the returned OPP after
1029
- * use.
1030
- */
1031
- struct dev_pm_opp * of_dev_pm_opp_find_required_opp (struct device * dev ,
1032
- struct device_node * np )
1033
- {
1034
- struct dev_pm_opp * temp_opp , * opp = ERR_PTR (- ENODEV );
1035
- struct device_node * required_np ;
1036
- struct opp_table * opp_table ;
1037
-
1038
- opp_table = _find_opp_table (dev );
1039
- if (IS_ERR (opp_table ))
1040
- return ERR_CAST (opp_table );
1041
-
1042
- required_np = of_parse_phandle (np , "required-opps" , 0 );
1043
- if (unlikely (!required_np )) {
1044
- dev_err (dev , "Unable to parse required-opps\n" );
1045
- goto put_opp_table ;
1046
- }
1047
-
1048
- mutex_lock (& opp_table -> lock );
1049
-
1050
- list_for_each_entry (temp_opp , & opp_table -> opp_list , node ) {
1051
- if (temp_opp -> available && temp_opp -> np == required_np ) {
1052
- opp = temp_opp ;
1053
-
1054
- /* Increment the reference count of OPP */
1055
- dev_pm_opp_get (opp );
1056
- break ;
1057
- }
1058
- }
1059
-
1060
- mutex_unlock (& opp_table -> lock );
1061
-
1062
- of_node_put (required_np );
1063
- put_opp_table :
1064
- dev_pm_opp_put_opp_table (opp_table );
1065
-
1066
- return opp ;
1067
- }
1068
- EXPORT_SYMBOL_GPL (of_dev_pm_opp_find_required_opp );
1069
-
1070
1016
/**
1071
1017
* dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp
1072
1018
* @opp: opp for which DT node has to be returned for
0 commit comments