watchdog: indydog: Simplify indydog_{start,stop}
authorAlexander Shiyan <shc_work@mail.ru>
Sat, 15 Feb 2014 09:21:51 +0000 (13:21 +0400)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 31 Mar 2014 11:26:31 +0000 (13:26 +0200)
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>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/indydog.c

index 1b5c25a..5d20cdd 100644 (file)
@@ -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");