Skip to content

Commit

Permalink
Merge branch 'pm-opp'
Browse files Browse the repository at this point in the history
* pm-opp:
  PM / OPP: remove double calls to find_device_opp()
  PM / OPP: set new_opp->dev_opp to a valid dev_opp
  • Loading branch information
Rafael J. Wysocki committed Dec 10, 2014
2 parents fc813e5 + 2a6127d commit dec6c26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/base/power/opp.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq,
mutex_lock(&dev_opp_list_lock);

/* populate the opp table */
new_opp->dev_opp = dev_opp;
new_opp->rate = freq;
new_opp->u_volt = u_volt;
new_opp->available = true;
Expand Down Expand Up @@ -460,6 +459,7 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq,
}

list_add:
new_opp->dev_opp = dev_opp;
list_add_rcu(&new_opp->node, head);
mutex_unlock(&dev_opp_list_lock);

Expand Down Expand Up @@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(of_init_opp_table);
*/
void of_free_opp_table(struct device *dev)
{
struct device_opp *dev_opp = find_device_opp(dev);
struct device_opp *dev_opp;
struct dev_pm_opp *opp, *tmp;

/* Check for existing list for 'dev' */
Expand Down

0 comments on commit dec6c26

Please sign in to comment.