Merge branch 'vhost-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst...
[pandora-kernel.git] / arch / mn10300 / lib / delay.c
index fdf6f71..8e7ceb8 100644 (file)
@@ -38,14 +38,14 @@ EXPORT_SYMBOL(__delay);
  */
 void __udelay(unsigned long usecs)
 {
-       signed long ioclk, stop;
+       unsigned long start, stop, cnt;
 
        /* usecs * CLK / 1E6 */
        stop = __muldiv64u(usecs, MN10300_TSCCLK, 1000000);
-       stop = TMTSCBC - stop;
+       start = TMTSCBC;
 
        do {
-               ioclk = TMTSCBC;
-       } while (stop < ioclk);
+               cnt = start - TMTSCBC;
+       } while (cnt < stop);
 }
 EXPORT_SYMBOL(__udelay);