clocksource/drivers/h8300: Fix timer not overflow case

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
Yoshinori Sato 2015-12-05 02:48:15 +09:00 committed by Daniel Lezcano
parent 2a0ff87774
commit 2f445e0aa0
1 changed files with 4 additions and 2 deletions

View File

@ -48,8 +48,10 @@ static unsigned long timer16_get_counter(struct timer16_priv *p)
} while (unlikely((o1 != o2) || (v1 > v2 && v1 < v3)
|| (v2 > v3 && v2 < v1) || (v3 > v1 && v3 < v2)));
v2 |= 0x10000;
return v2;
if (likely(!o1))
return v2;
else
return v2 + 0x10000;
}