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>
This commit is contained in:
parent
7bce7c011e
commit
0c29c2e850
|
@ -41,24 +41,15 @@ MODULE_PARM_DESC(nowayout,
|
||||||
|
|
||||||
static void indydog_start(void)
|
static void indydog_start(void)
|
||||||
{
|
{
|
||||||
u32 mc_ctrl0;
|
|
||||||
|
|
||||||
spin_lock(&indydog_lock);
|
spin_lock(&indydog_lock);
|
||||||
mc_ctrl0 = sgimc->cpuctrl0;
|
sgimc->cpuctrl0 |= SGIMC_CCTRL0_WDOG;
|
||||||
mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
|
|
||||||
sgimc->cpuctrl0 = mc_ctrl0;
|
|
||||||
spin_unlock(&indydog_lock);
|
spin_unlock(&indydog_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void indydog_stop(void)
|
static void indydog_stop(void)
|
||||||
{
|
{
|
||||||
u32 mc_ctrl0;
|
|
||||||
|
|
||||||
spin_lock(&indydog_lock);
|
spin_lock(&indydog_lock);
|
||||||
|
sgimc->cpuctrl0 &= ~SGIMC_CCTRL0_WDOG;
|
||||||
mc_ctrl0 = sgimc->cpuctrl0;
|
|
||||||
mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
|
|
||||||
sgimc->cpuctrl0 = mc_ctrl0;
|
|
||||||
spin_unlock(&indydog_lock);
|
spin_unlock(&indydog_lock);
|
||||||
|
|
||||||
pr_info("Stopped watchdog timer\n");
|
pr_info("Stopped watchdog timer\n");
|
||||||
|
|
Loading…
Reference in New Issue