diff options
-rw-r--r-- | arch/openrisc/lib/delay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/openrisc/lib/delay.c b/arch/openrisc/lib/delay.c index 0c12407d3d5c..c330767c9217 100644 --- a/arch/openrisc/lib/delay.c +++ b/arch/openrisc/lib/delay.c | |||
@@ -30,9 +30,9 @@ int __devinit read_current_timer(unsigned long *timer_value) | |||
30 | 30 | ||
31 | void __delay(unsigned long cycles) | 31 | void __delay(unsigned long cycles) |
32 | { | 32 | { |
33 | cycles_t target = get_cycles() + cycles; | 33 | cycles_t start = get_cycles(); |
34 | 34 | ||
35 | while (get_cycles() < target) | 35 | while ((get_cycles() - start) < cycles) |
36 | cpu_relax(); | 36 | cpu_relax(); |
37 | } | 37 | } |
38 | EXPORT_SYMBOL(__delay); | 38 | EXPORT_SYMBOL(__delay); |