Commit ae5056e8 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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
parents 92a578b0 dec6c26b
...@@ -400,7 +400,6 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq, ...@@ -400,7 +400,6 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq,
mutex_lock(&dev_opp_list_lock); mutex_lock(&dev_opp_list_lock);
/* populate the opp table */ /* populate the opp table */
new_opp->dev_opp = dev_opp;
new_opp->rate = freq; new_opp->rate = freq;
new_opp->u_volt = u_volt; new_opp->u_volt = u_volt;
new_opp->available = true; new_opp->available = true;
...@@ -460,6 +459,7 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq, ...@@ -460,6 +459,7 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq,
} }
list_add: list_add:
new_opp->dev_opp = dev_opp;
list_add_rcu(&new_opp->node, head); list_add_rcu(&new_opp->node, head);
mutex_unlock(&dev_opp_list_lock); mutex_unlock(&dev_opp_list_lock);
...@@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(of_init_opp_table); ...@@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(of_init_opp_table);
*/ */
void of_free_opp_table(struct device *dev) 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; struct dev_pm_opp *opp, *tmp;
/* Check for existing list for 'dev' */ /* Check for existing list for 'dev' */
......
...@@ -203,7 +203,7 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev) ...@@ -203,7 +203,7 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
fwnode_property_read_string(child, "linux,default-trigger", fwnode_property_read_string(child, "linux,default-trigger",
&led.default_trigger); &led.default_trigger);
if (!fwnode_property_read_string(child, "linux,default_state", if (!fwnode_property_read_string(child, "default-state",
&state)) { &state)) {
if (!strcmp(state, "keep")) if (!strcmp(state, "keep"))
led.default_state = LEDS_GPIO_DEFSTATE_KEEP; led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
......
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