diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-12-10 01:57:07 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-10 01:57:07 +0100 |
commit | d735d25e60fffeffc256fa5d59551dc92dc07e36 (patch) | |
tree | 2259d408fdbfb0c0181e51e8c9bc98c7068b831c /drivers/leds | |
parent | 29470ea8d828e4dec74e94f7f17b7479ff5ef276 (diff) | |
download | linux-d735d25e60fffeffc256fa5d59551dc92dc07e36.tar.gz linux-d735d25e60fffeffc256fa5d59551dc92dc07e36.tar.bz2 linux-d735d25e60fffeffc256fa5d59551dc92dc07e36.zip |
leds: leds-gpio: Fix the "default-state" property check
Commit a43f2cbbb009f9 ("leds: leds-gpio: Make use of device property API")
caused a regression by reading the incorrect string for the "default-state"
property.
Fix the property string check to restore the original behaviour.
Fixes: a43f2cbbb009 (leds: leds-gpio: Make use of device property API)
Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |