Commit ad6384ba authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

PM / Domains: Rename opp_node to np

The DT node passed here isn't necessarily an OPP node, as this routine
can also be used for cases where the "required-opps" property is present
directly in the device's node. Rename it.

This also removes a stale comment.
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 5e03aa61
...@@ -2487,10 +2487,9 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); ...@@ -2487,10 +2487,9 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states);
* power domain corresponding to a DT node's "required-opps" property. * power domain corresponding to a DT node's "required-opps" property.
* *
* @dev: Device for which the performance-state needs to be found. * @dev: Device for which the performance-state needs to be found.
* @opp_node: DT node where the "required-opps" property is present. This can be * @np: DT node where the "required-opps" property is present. This can be
* the device node itself (if it doesn't have an OPP table) or a node * the device node itself (if it doesn't have an OPP table) or a node
* within the OPP table of a device (if device has an OPP table). * within the OPP table of a device (if device has an OPP table).
* @state: Pointer to return performance state.
* *
* Returns performance state corresponding to the "required-opps" property of * Returns performance state corresponding to the "required-opps" property of
* a DT node. This calls platform specific genpd->opp_to_performance_state() * a DT node. This calls platform specific genpd->opp_to_performance_state()
...@@ -2499,7 +2498,7 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); ...@@ -2499,7 +2498,7 @@ EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states);
* Returns performance state on success and 0 on failure. * Returns performance state on success and 0 on failure.
*/ */
unsigned int of_genpd_opp_to_performance_state(struct device *dev, unsigned int of_genpd_opp_to_performance_state(struct device *dev,
struct device_node *opp_node) struct device_node *np)
{ {
struct generic_pm_domain *genpd; struct generic_pm_domain *genpd;
struct dev_pm_opp *opp; struct dev_pm_opp *opp;
...@@ -2514,7 +2513,7 @@ unsigned int of_genpd_opp_to_performance_state(struct device *dev, ...@@ -2514,7 +2513,7 @@ unsigned int of_genpd_opp_to_performance_state(struct device *dev,
genpd_lock(genpd); genpd_lock(genpd);
opp = of_dev_pm_opp_find_required_opp(&genpd->dev, opp_node); opp = of_dev_pm_opp_find_required_opp(&genpd->dev, np);
if (IS_ERR(opp)) { if (IS_ERR(opp)) {
dev_err(dev, "Failed to find required OPP: %ld\n", dev_err(dev, "Failed to find required OPP: %ld\n",
PTR_ERR(opp)); PTR_ERR(opp));
......
...@@ -234,7 +234,7 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); ...@@ -234,7 +234,7 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
int of_genpd_parse_idle_states(struct device_node *dn, int of_genpd_parse_idle_states(struct device_node *dn,
struct genpd_power_state **states, int *n); struct genpd_power_state **states, int *n);
unsigned int of_genpd_opp_to_performance_state(struct device *dev, unsigned int of_genpd_opp_to_performance_state(struct device *dev,
struct device_node *opp_node); struct device_node *np);
int genpd_dev_pm_attach(struct device *dev); int genpd_dev_pm_attach(struct device *dev);
struct device *genpd_dev_pm_attach_by_id(struct device *dev, struct device *genpd_dev_pm_attach_by_id(struct device *dev,
...@@ -274,7 +274,7 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn, ...@@ -274,7 +274,7 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
static inline unsigned int static inline unsigned int
of_genpd_opp_to_performance_state(struct device *dev, of_genpd_opp_to_performance_state(struct device *dev,
struct device_node *opp_node) struct device_node *np)
{ {
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment