Skip to content

Commit 534245c

Browse files
committed
OPP: Remove of_dev_pm_opp_find_required_opp()
This isn't used anymore, remove it. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 4c6a343 commit 534245c

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

drivers/opp/of.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,60 +1013,6 @@ unsigned int of_get_required_opp_performance_state(struct device_node *np,
10131013
}
10141014
EXPORT_SYMBOL_GPL(of_get_required_opp_performance_state);
10151015

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-
10701016
/**
10711017
* dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp
10721018
* @opp: opp for which DT node has to be returned for

include/linux/pm_opp.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask);
313313
void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask);
314314
int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask);
315315
struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev);
316-
struct dev_pm_opp *of_dev_pm_opp_find_required_opp(struct device *dev, struct device_node *np);
317316
struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp);
318317
unsigned int of_get_required_opp_performance_state(struct device_node *np, int index);
319318
#else
@@ -350,10 +349,6 @@ static inline struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device
350349
return NULL;
351350
}
352351

353-
static inline struct dev_pm_opp *of_dev_pm_opp_find_required_opp(struct device *dev, struct device_node *np)
354-
{
355-
return NULL;
356-
}
357352
static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
358353
{
359354
return NULL;

0 commit comments

Comments
 (0)