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 | |
parent | 29470ea8d828e4dec74e94f7f17b7479ff5ef276 (diff) | |
download | op-kernel-dev-d735d25e60fffeffc256fa5d59551dc92dc07e36.zip op-kernel-dev-d735d25e60fffeffc256fa5d59551dc92dc07e36.tar.gz |
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>
-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 868e6fc..5fb4440 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; |