Linux Watchdog driver development
 help / color / mirror / Atom feed
* [PATCH] watchdog: indydog: Simplify indydog_{start,stop}
@ 2014-02-15  9:21 Alexander Shiyan
  2014-02-15 17:44 ` Guenter Roeck
  2014-02-24 19:58 ` Wim Van Sebroeck
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shiyan @ 2014-02-15  9:21 UTC (permalink / raw)
  To: linux-watchdog; +Cc: Wim Van Sebroeck, Alexander Shiyan

This patch simplify functions indydog_start() and indydog_stop()
a bit and removes excess intermediate variable.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/watchdog/indydog.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c
index 1b5c25a..5d20cdd 100644
--- a/drivers/watchdog/indydog.c
+++ b/drivers/watchdog/indydog.c
@@ -41,24 +41,15 @@ MODULE_PARM_DESC(nowayout,
 
 static void indydog_start(void)
 {
-	u32 mc_ctrl0;
-
 	spin_lock(&indydog_lock);
-	mc_ctrl0 = sgimc->cpuctrl0;
-	mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
-	sgimc->cpuctrl0 = mc_ctrl0;
+	sgimc->cpuctrl0 |= SGIMC_CCTRL0_WDOG;
 	spin_unlock(&indydog_lock);
 }
 
 static void indydog_stop(void)
 {
-	u32 mc_ctrl0;
-
 	spin_lock(&indydog_lock);
-
-	mc_ctrl0 = sgimc->cpuctrl0;
-	mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
-	sgimc->cpuctrl0 = mc_ctrl0;
+	sgimc->cpuctrl0 &= ~SGIMC_CCTRL0_WDOG;
 	spin_unlock(&indydog_lock);
 
 	pr_info("Stopped watchdog timer\n");
-- 
1.8.3.2


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

end of thread, other threads:[~2014-02-24 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-15  9:21 [PATCH] watchdog: indydog: Simplify indydog_{start,stop} Alexander Shiyan
2014-02-15 17:44 ` Guenter Roeck
2014-02-24 19:58 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox