]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - lib/time.c
time: fix usec_to_tick()
[karo-tx-uboot.git] / lib / time.c
index 09bb05a24d331b0f023a149024278952e0e89054..8085aa40d1c96de75c4af0fcf74e2a8b917458c6 100644 (file)
@@ -71,8 +71,8 @@ unsigned long __weak notrace timer_get_us(void)
 }
 static unsigned long long usec_to_tick(unsigned long usec)
 {
-       uint64_t tick = usec * get_tbclk();
-       usec *= get_tbclk();
+       uint64_t tick = usec;
+       tick *= get_tbclk();
        do_div(tick, 1000000);
        return tick;
 }