diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-06-27 16:33:25 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-11-05 07:40:43 +0530 |
commit | 534245cc69c2a3597d8ed0e7782ae3f563e92c68 (patch) | |
tree | db87532c774b6749f9c44d7f8c15292b49d2b9cd /drivers/opp | |
parent | 4c6a343e57fe241fa30ab31ac4969561272cc6b2 (diff) | |
download | linux-534245cc69c2a3597d8ed0e7782ae3f563e92c68.tar.gz linux-534245cc69c2a3597d8ed0e7782ae3f563e92c68.tar.bz2 linux-534245cc69c2a3597d8ed0e7782ae3f563e92c68.zip |
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>
Diffstat (limited to 'drivers/opp')
-rw-r--r-- | drivers/opp/of.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 369d63a58ac4..3740822b4197 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -1014,60 +1014,6 @@ put_required_np: EXPORT_SYMBOL_GPL(of_get_required_opp_performance_state); /** - * of_dev_pm_opp_find_required_opp() - Search for required OPP. - * @dev: The device whose OPP node is referenced by the 'np' DT node. - * @np: Node that contains the "required-opps" property. - * - * Returns the OPP of the device 'dev', whose phandle is present in the "np" - * node. Although the "required-opps" property supports having multiple - * phandles, this helper routine only parses the very first phandle in the list. - * - * Return: Matching opp, else returns ERR_PTR in case of error and should be - * handled using IS_ERR. - * - * The callers are required to call dev_pm_opp_put() for the returned OPP after - * use. - */ -struct dev_pm_opp *of_dev_pm_opp_find_required_opp(struct device *dev, - struct device_node *np) -{ - struct dev_pm_opp *temp_opp, *opp = ERR_PTR(-ENODEV); - struct device_node *required_np; - struct opp_table *opp_table; - - opp_table = _find_opp_table(dev); - if (IS_ERR(opp_table)) - return ERR_CAST(opp_table); - - required_np = of_parse_phandle(np, "required-opps", 0); - if (unlikely(!required_np)) { - dev_err(dev, "Unable to parse required-opps\n"); - goto put_opp_table; - } - - mutex_lock(&opp_table->lock); - - list_for_each_entry(temp_opp, &opp_table->opp_list, node) { - if (temp_opp->available && temp_opp->np == required_np) { - opp = temp_opp; - - /* Increment the reference count of OPP */ - dev_pm_opp_get(opp); - break; - } - } - - mutex_unlock(&opp_table->lock); - - of_node_put(required_np); -put_opp_table: - dev_pm_opp_put_opp_table(opp_table); - - return opp; -} -EXPORT_SYMBOL_GPL(of_dev_pm_opp_find_required_opp); - -/** * dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp * @opp: opp for which DT node has to be returned for * |