From d735d25e60fffeffc256fa5d59551dc92dc07e36 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 10 Dec 2014 01:57:07 +0100 Subject: 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 Signed-off-by: Fabio Estevam Acked-by: Bryan Wu Signed-off-by: Rafael J. Wysocki --- drivers/leds/leds-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/leds/leds-gpio.c') 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; -- cgit v1.2.3