From 0c29c2e8506ab9cfebd4836e758aa55dd5cf66fe Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Sat, 15 Feb 2014 13:21:51 +0400 Subject: [PATCH] watchdog: indydog: Simplify indydog_{start,stop} This patch simplify functions indydog_start() and indydog_stop() a bit and removes excess intermediate variable. Signed-off-by: Alexander Shiyan Reviewed-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- 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 1b5c25a47b8..5d20cdd30ef 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"); -- 2.46.0