* [PATCH] leds: wm8350: Complain if we fail to reenable DCDC
@ 2013-03-02 7:40 Mark Brown
2013-03-05 19:03 ` Bryan Wu
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-03-02 7:40 UTC (permalink / raw)
To: Bryan Wu, Richard Purdie; +Cc: patches, linux-leds, linux-kernel, Mark Brown
Provide some trace, though the hardware is most likely non-functional if
this happens.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/leds/leds-wm8350.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c
index ed15157..86bdab3 100644
--- a/drivers/leds/leds-wm8350.c
+++ b/drivers/leds/leds-wm8350.c
@@ -129,7 +129,11 @@ static void wm8350_led_disable(struct wm8350_led *led)
ret = regulator_disable(led->isink);
if (ret != 0) {
dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
- regulator_enable(led->dcdc);
+ ret = regulator_enable(led->dcdc);
+ if (ret != 0) {
+ dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
+ ret);
+ }
return;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] leds: wm8350: Complain if we fail to reenable DCDC
2013-03-02 7:40 [PATCH] leds: wm8350: Complain if we fail to reenable DCDC Mark Brown
@ 2013-03-05 19:03 ` Bryan Wu
2013-03-06 4:55 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Bryan Wu @ 2013-03-05 19:03 UTC (permalink / raw)
To: Mark Brown; +Cc: Richard Purdie, patches, linux-leds, linux-kernel
On Fri, Mar 1, 2013 at 11:40 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> Provide some trace, though the hardware is most likely non-functional if
> this happens.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/leds/leds-wm8350.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c
> index ed15157..86bdab3 100644
> --- a/drivers/leds/leds-wm8350.c
> +++ b/drivers/leds/leds-wm8350.c
> @@ -129,7 +129,11 @@ static void wm8350_led_disable(struct wm8350_led *led)
> ret = regulator_disable(led->isink);
> if (ret != 0) {
> dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
> - regulator_enable(led->dcdc);
> + ret = regulator_enable(led->dcdc);
> + if (ret != 0) {
looks like we don't need this bracket here.
> + dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
> + ret);
> + }
ditto.
Thanks,
-Bryan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] leds: wm8350: Complain if we fail to reenable DCDC
2013-03-05 19:03 ` Bryan Wu
@ 2013-03-06 4:55 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-03-06 4:55 UTC (permalink / raw)
To: Bryan Wu; +Cc: Richard Purdie, patches, linux-leds, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
On Tue, Mar 05, 2013 at 11:03:52AM -0800, Bryan Wu wrote:
> On Fri, Mar 1, 2013 at 11:40 PM, Mark Brown
> > if (ret != 0) {
> > dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
> > - regulator_enable(led->dcdc);
> > + ret = regulator_enable(led->dcdc);
> > + if (ret != 0) {
> looks like we don't need this bracket here.
>
> > + dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
> > + ret);
> > + }
> ditto.
It's not required but since it's inside a small but multi-line block
there's the whole thing about including braces at all levels for
clarity.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] leds: wm8350: Complain if we fail to reenable DCDC
2013-03-06 5:01 Mark Brown
@ 2013-03-06 17:50 ` Bryan Wu
0 siblings, 0 replies; 5+ messages in thread
From: Bryan Wu @ 2013-03-06 17:50 UTC (permalink / raw)
To: Mark Brown; +Cc: Richard Purdie, patches, linux-leds, linux-kernel
On Tue, Mar 5, 2013 at 9:01 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> Provide some trace, though the hardware is most likely non-functional if
> this happens.
>
Thanks for the update, I will merge it.
-Bryan
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/leds/leds-wm8350.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c
> index ed15157..8a181d5 100644
> --- a/drivers/leds/leds-wm8350.c
> +++ b/drivers/leds/leds-wm8350.c
> @@ -129,7 +129,10 @@ static void wm8350_led_disable(struct wm8350_led *led)
> ret = regulator_disable(led->isink);
> if (ret != 0) {
> dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
> - regulator_enable(led->dcdc);
> + ret = regulator_enable(led->dcdc);
> + if (ret != 0)
> + dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
> + ret);
> return;
> }
>
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] leds: wm8350: Complain if we fail to reenable DCDC
@ 2013-03-06 5:01 Mark Brown
2013-03-06 17:50 ` Bryan Wu
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-03-06 5:01 UTC (permalink / raw)
To: Bryan Wu, Richard Purdie; +Cc: patches, linux-leds, linux-kernel, Mark Brown
Provide some trace, though the hardware is most likely non-functional if
this happens.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/leds/leds-wm8350.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c
index ed15157..8a181d5 100644
--- a/drivers/leds/leds-wm8350.c
+++ b/drivers/leds/leds-wm8350.c
@@ -129,7 +129,10 @@ static void wm8350_led_disable(struct wm8350_led *led)
ret = regulator_disable(led->isink);
if (ret != 0) {
dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
- regulator_enable(led->dcdc);
+ ret = regulator_enable(led->dcdc);
+ if (ret != 0)
+ dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
+ ret);
return;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-06 17:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02 7:40 [PATCH] leds: wm8350: Complain if we fail to reenable DCDC Mark Brown
2013-03-05 19:03 ` Bryan Wu
2013-03-06 4:55 ` Mark Brown
2013-03-06 5:01 Mark Brown
2013-03-06 17:50 ` Bryan Wu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.