Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f445e0a authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Daniel Lezcano
Browse files

clocksource/drivers/h8300: Fix timer not overflow case

parent 2a0ff877
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
	if (likely(!o1))
		return v2;
	else
		return v2 + 0x10000;
}