Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <shc_work@mail.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Alexander Shiyan and committed by
Wim Van Sebroeck
0c29c2e8 7bce7c01

+2 -11
+2 -11
drivers/watchdog/indydog.c
··· 41 41 42 42 static void indydog_start(void) 43 43 { 44 - u32 mc_ctrl0; 45 - 46 44 spin_lock(&indydog_lock); 47 - mc_ctrl0 = sgimc->cpuctrl0; 48 - mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG; 49 - sgimc->cpuctrl0 = mc_ctrl0; 45 + sgimc->cpuctrl0 |= SGIMC_CCTRL0_WDOG; 50 46 spin_unlock(&indydog_lock); 51 47 } 52 48 53 49 static void indydog_stop(void) 54 50 { 55 - u32 mc_ctrl0; 56 - 57 51 spin_lock(&indydog_lock); 58 - 59 - mc_ctrl0 = sgimc->cpuctrl0; 60 - mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG; 61 - sgimc->cpuctrl0 = mc_ctrl0; 52 + sgimc->cpuctrl0 &= ~SGIMC_CCTRL0_WDOG; 62 53 spin_unlock(&indydog_lock); 63 54 64 55 pr_info("Stopped watchdog timer\n");