linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: leds-gpio: Fix the "default-state" property check
@ 2014-12-09 16:31 Fabio Estevam
  2014-12-09 19:13 ` Bryan Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2014-12-09 16:31 UTC (permalink / raw)
  To: rafael.j.wysocki
  Cc: cooloney, grant.likely, jean-michel.hautbois, festevam,
	linux-leds, linux-kernel, Fabio Estevam

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>
---
 drivers/leds/leds-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 8a8ba11..7ea1ea42 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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] leds: leds-gpio: Fix the "default-state" property check
  2014-12-09 16:31 [PATCH] leds: leds-gpio: Fix the "default-state" property check Fabio Estevam
@ 2014-12-09 19:13 ` Bryan Wu
  2014-12-10  1:12   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan Wu @ 2014-12-09 19:13 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Rafael J. Wysocki, Grant Likely, Jean-Michel Hautbois,
	Fabio Estevam, Linux LED Subsystem, lkml

On Tue, Dec 9, 2014 at 8:31 AM, Fabio Estevam
<fabio.estevam@freescale.com> wrote:
> 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)

Thanks, please take my Ack
Acked-by: Bryan Wu <cooloney@gmail.com>

I think Rafael will take this fix with other patches through his tree.


> Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/leds/leds-gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index 8a8ba11..7ea1ea42 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;
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] leds: leds-gpio: Fix the "default-state" property check
  2014-12-09 19:13 ` Bryan Wu
@ 2014-12-10  1:12   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2014-12-10  1:12 UTC (permalink / raw)
  To: Bryan Wu, Fabio Estevam
  Cc: Grant Likely, Jean-Michel Hautbois, Fabio Estevam,
	Linux LED Subsystem, lkml

On 12/9/2014 8:13 PM, Bryan Wu wrote:
> On Tue, Dec 9, 2014 at 8:31 AM, Fabio Estevam
> <fabio.estevam@freescale.com> wrote:
>> 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)
> Thanks, please take my Ack
> Acked-by: Bryan Wu <cooloney@gmail.com>
>
> I think Rafael will take this fix with other patches through his tree.

Yes, I will, thanks!

And sorry for the breakage ...

>
>> Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> ---
>>   drivers/leds/leds-gpio.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
>> index 8a8ba11..7ea1ea42 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;
>> --
>> 1.9.1
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-10  1:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 16:31 [PATCH] leds: leds-gpio: Fix the "default-state" property check Fabio Estevam
2014-12-09 19:13 ` Bryan Wu
2014-12-10  1:12   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).