diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-02-15 04:21:51 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2014-03-31 07:26:31 -0400 |
commit | 0c29c2e8506ab9cfebd4836e758aa55dd5cf66fe (patch) | |
tree | 8d879cd51aa7409073b2c65bc9a2eb0de4d83d32 /drivers/watchdog/indydog.c | |
parent | 7bce7c011e8f5d6e4e3da2309a614b6efb10466b (diff) |
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>
Diffstat (limited to 'drivers/watchdog/indydog.c')
-rw-r--r-- | drivers/watchdog/indydog.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c index 1b5c25a47b87..5d20cdd30efe 100644 --- a/drivers/watchdog/indydog.c +++ b/drivers/watchdog/indydog.c | |||
@@ -41,24 +41,15 @@ MODULE_PARM_DESC(nowayout, | |||
41 | 41 | ||
42 | static void indydog_start(void) | 42 | static void indydog_start(void) |
43 | { | 43 | { |
44 | u32 mc_ctrl0; | ||
45 | |||
46 | spin_lock(&indydog_lock); | 44 | spin_lock(&indydog_lock); |
47 | mc_ctrl0 = sgimc->cpuctrl0; | 45 | sgimc->cpuctrl0 |= SGIMC_CCTRL0_WDOG; |
48 | mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG; | ||
49 | sgimc->cpuctrl0 = mc_ctrl0; | ||
50 | spin_unlock(&indydog_lock); | 46 | spin_unlock(&indydog_lock); |
51 | } | 47 | } |
52 | 48 | ||
53 | static void indydog_stop(void) | 49 | static void indydog_stop(void) |
54 | { | 50 | { |
55 | u32 mc_ctrl0; | ||
56 | |||
57 | spin_lock(&indydog_lock); | 51 | spin_lock(&indydog_lock); |
58 | 52 | sgimc->cpuctrl0 &= ~SGIMC_CCTRL0_WDOG; | |
59 | mc_ctrl0 = sgimc->cpuctrl0; | ||
60 | mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG; | ||
61 | sgimc->cpuctrl0 = mc_ctrl0; | ||
62 | spin_unlock(&indydog_lock); | 53 | spin_unlock(&indydog_lock); |
63 | 54 | ||
64 | pr_info("Stopped watchdog timer\n"); | 55 | pr_info("Stopped watchdog timer\n"); |