diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-10 16:17:25 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-10 16:17:25 -0500 |
commit | dec6c26b6ebdbfb03b5abaf399434169935cb996 (patch) | |
tree | 0eaa30636c04077906ad368ab7e8b8ed73765691 /drivers/base | |
parent | fc813e50d3a43bc5d2527384fcb76519c6808986 (diff) | |
parent | 2a6127d037de96e8add0b09e0200b331a4db54be (diff) |
Merge branch 'pm-opp'
* pm-opp:
PM / OPP: remove double calls to find_device_opp()
PM / OPP: set new_opp->dev_opp to a valid dev_opp
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/opp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 2d195f3a1998..1bbef8e838e7 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c | |||
@@ -400,7 +400,6 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq, | |||
400 | mutex_lock(&dev_opp_list_lock); | 400 | mutex_lock(&dev_opp_list_lock); |
401 | 401 | ||
402 | /* populate the opp table */ | 402 | /* populate the opp table */ |
403 | new_opp->dev_opp = dev_opp; | ||
404 | new_opp->rate = freq; | 403 | new_opp->rate = freq; |
405 | new_opp->u_volt = u_volt; | 404 | new_opp->u_volt = u_volt; |
406 | new_opp->available = true; | 405 | new_opp->available = true; |
@@ -460,6 +459,7 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq, | |||
460 | } | 459 | } |
461 | 460 | ||
462 | list_add: | 461 | list_add: |
462 | new_opp->dev_opp = dev_opp; | ||
463 | list_add_rcu(&new_opp->node, head); | 463 | list_add_rcu(&new_opp->node, head); |
464 | mutex_unlock(&dev_opp_list_lock); | 464 | mutex_unlock(&dev_opp_list_lock); |
465 | 465 | ||
@@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(of_init_opp_table); | |||
768 | */ | 768 | */ |
769 | void of_free_opp_table(struct device *dev) | 769 | void of_free_opp_table(struct device *dev) |
770 | { | 770 | { |
771 | struct device_opp *dev_opp = find_device_opp(dev); | 771 | struct device_opp *dev_opp; |
772 | struct dev_pm_opp *opp, *tmp; | 772 | struct dev_pm_opp *opp, *tmp; |
773 | 773 | ||
774 | /* Check for existing list for 'dev' */ | 774 | /* Check for existing list for 'dev' */ |