提交 2f445e0a 编写于 作者: Y Yoshinori Sato 提交者: Daniel Lezcano

clocksource/drivers/h8300: Fix timer not overflow case

Signed-off-by: NYoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 2a0ff877
无相关合并请求
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部