summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-11 19:54:30 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-11 19:54:30 +0300
commitae5056e8573c99c51acc4d77b287118ac015b4c1 (patch)
tree137fa5aa758eca9c11d52df6c943a689040a1e3b
parent92a578b064d0227a3a7fbbdb9e29dbab7f8d400e (diff)
parentdec6c26b6ebdbfb03b5abaf399434169935cb996 (diff)
downloadlinux-ae5056e8573c99c51acc4d77b287118ac015b4c1.tar.xz
Merge branch 'fixes'
* fixes: PM / OPP: remove double calls to find_device_opp() PM / OPP: set new_opp->dev_opp to a valid dev_opp leds: leds-gpio: Fix the "default-state" property check
-rw-r--r--drivers/base/power/opp.c4
-rw-r--r--drivers/leds/leds-gpio.c2
2 files changed, 3 insertions, 3 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,
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;
@@ -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);
@@ -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' */
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 868e6fc17cba..5fb4440127d9 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -203,7 +203,7 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
fwnode_property_read_string(child, "linux,default-trigger",
&led.default_trigger);
- if (!fwnode_property_read_string(child, "linux,default_state",
+ if (!fwnode_property_read_string(child, "default-state",
&state)) {
if (!strcmp(state, "keep"))
led.default_state = LEDS_GPIO_DEFSTATE_KEEP;