Skip to content
Snippets Groups Projects
Commit 78df8c68 authored by Nobuhiro Iwamatsu's avatar Nobuhiro Iwamatsu Committed by Nobuhiro Iwamatsu
Browse files

sh: timer: Remove unnecessary variable 'ticks'

parent 117029c5
No related branches found
No related tags found
No related merge requests found
...@@ -108,14 +108,9 @@ int timer_init (void) ...@@ -108,14 +108,9 @@ int timer_init (void)
unsigned long long get_ticks (void) unsigned long long get_ticks (void)
{ {
unsigned long tcnt = 0 - readl(TCNT0); unsigned long tcnt = 0 - readl(TCNT0);
unsigned long ticks;
if (last_tcnt > tcnt) { /* overflow */ if (last_tcnt > tcnt) /* overflow */
overflow_ticks++; overflow_ticks++;
ticks = (0xffffffff - last_tcnt) + tcnt;
} else {
ticks = tcnt;
}
last_tcnt = tcnt; last_tcnt = tcnt;
return (overflow_ticks << 32) | tcnt; return (overflow_ticks << 32) | tcnt;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment