All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc-coh901331: Fix braces in resume code.
@ 2010-03-03 11:55 James Hogan
  2010-03-03 12:44 ` Linus Walleij
  2010-03-03 15:19 ` [rtc-linux] " Alessandro Zummo
  0 siblings, 2 replies; 3+ messages in thread
From: James Hogan @ 2010-03-03 11:55 UTC (permalink / raw)
  To: Alessandro Zummo, Paul Gortmaker, Linus Walleij, Andrew Morton,
	Russell King, rtc-linux, linux-kernel

The else part of the if statement is indented but does not have braces
around it. It clearly should since it uses clk_enable and clk_disable
which are supposed to balance.

Signed-off-by: James Hogan <james@albanarts.com>
---
 drivers/rtc/rtc-coh901331.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c
index 03ea530..44c4399 100644
--- a/drivers/rtc/rtc-coh901331.c
+++ b/drivers/rtc/rtc-coh901331.c
@@ -271,12 +271,13 @@ static int coh901331_resume(struct platform_device *pdev)
 {
 	struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev);

-	if (device_may_wakeup(&pdev->dev))
+	if (device_may_wakeup(&pdev->dev)) {
 		disable_irq_wake(rtap->irq);
-	else
+	} else {
 		clk_enable(rtap->clk);
 		writel(rtap->irqmaskstore, rtap->virtbase + COH901331_IRQ_MASK);
 		clk_disable(rtap->clk);
+	}
 	return 0;
 }
 #else
-- 
1.5.5.6

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

* RE: [PATCH] rtc-coh901331: Fix braces in resume code.
  2010-03-03 11:55 [PATCH] rtc-coh901331: Fix braces in resume code James Hogan
@ 2010-03-03 12:44 ` Linus Walleij
  2010-03-03 15:19 ` [rtc-linux] " Alessandro Zummo
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2010-03-03 12:44 UTC (permalink / raw)
  To: James Hogan, Alessandro Zummo, Paul Gortmaker, Andrew Morton,
	Russell King, rtc-linux, linux-kernel

[James]
> The else part of the if statement is indented but does not have braces
> around it. It clearly should since it uses clk_enable and clk_disable
> which are supposed to balance.
> 
> Signed-off-by: James Hogan <james@albanarts.com>

OMG, thanks for spotting this!
Acked-by: Linus Walleij <linus.walleij@stericsson.com>

Yours,
Linus Walleij

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

* Re: [rtc-linux] [PATCH] rtc-coh901331: Fix braces in resume code.
  2010-03-03 11:55 [PATCH] rtc-coh901331: Fix braces in resume code James Hogan
  2010-03-03 12:44 ` Linus Walleij
@ 2010-03-03 15:19 ` Alessandro Zummo
  1 sibling, 0 replies; 3+ messages in thread
From: Alessandro Zummo @ 2010-03-03 15:19 UTC (permalink / raw)
  To: rtc-linux
  Cc: james, Paul Gortmaker, Linus Walleij, Andrew Morton,
	Russell King, linux-kernel

On Wed, 3 Mar 2010 11:55:15 +0000
James Hogan <james@albanarts.com> wrote:

> The else part of the if statement is indented but does not have braces
> around it. It clearly should since it uses clk_enable and clk_disable
> which are supposed to balance.
> 
> Signed-off-by: James Hogan <james@albanarts.com>

 Acked-by: Alessandro Zummo <a.zummo@towertech.it>
-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


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

end of thread, other threads:[~2010-03-03 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 11:55 [PATCH] rtc-coh901331: Fix braces in resume code James Hogan
2010-03-03 12:44 ` Linus Walleij
2010-03-03 15:19 ` [rtc-linux] " Alessandro Zummo

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.