diff options
author | Luca Falavigna <dktrkranz@gmail.com> | 2005-06-28 23:44:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-29 00:20:29 -0400 |
commit | 47f176fdaf8924bc83fddcf9658f2fd3ef60d573 (patch) | |
tree | ae54af35889451bf7873595180365182bd704ff1 /kernel/irq/autoprobe.c | |
parent | 8d451687ca57371d303c5554b377d7f5c2ac6ae0 (diff) |
[PATCH] Using msleep() instead of HZ
Use msleep() in a few places.
Signed-off-by: Luca Falavigna <dktrkranz@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/irq/autoprobe.c')
-rw-r--r-- | kernel/irq/autoprobe.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c index 98d62d8efeaf..3467097ca61a 100644 --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/irq.h> | 9 | #include <linux/irq.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/delay.h> | ||
12 | 13 | ||
13 | /* | 14 | /* |
14 | * Autodetection depends on the fact that any interrupt that | 15 | * Autodetection depends on the fact that any interrupt that |
@@ -26,7 +27,7 @@ static DECLARE_MUTEX(probe_sem); | |||
26 | */ | 27 | */ |
27 | unsigned long probe_irq_on(void) | 28 | unsigned long probe_irq_on(void) |
28 | { | 29 | { |
29 | unsigned long val, delay; | 30 | unsigned long val; |
30 | irq_desc_t *desc; | 31 | irq_desc_t *desc; |
31 | unsigned int i; | 32 | unsigned int i; |
32 | 33 | ||
@@ -45,8 +46,7 @@ unsigned long probe_irq_on(void) | |||
45 | } | 46 | } |
46 | 47 | ||
47 | /* Wait for longstanding interrupts to trigger. */ | 48 | /* Wait for longstanding interrupts to trigger. */ |
48 | for (delay = jiffies + HZ/50; time_after(delay, jiffies); ) | 49 | msleep(20); |
49 | /* about 20ms delay */ barrier(); | ||
50 | 50 | ||
51 | /* | 51 | /* |
52 | * enable any unassigned irqs | 52 | * enable any unassigned irqs |
@@ -68,8 +68,7 @@ unsigned long probe_irq_on(void) | |||
68 | /* | 68 | /* |
69 | * Wait for spurious interrupts to trigger | 69 | * Wait for spurious interrupts to trigger |
70 | */ | 70 | */ |
71 | for (delay = jiffies + HZ/10; time_after(delay, jiffies); ) | 71 | msleep(100); |
72 | /* about 100ms delay */ barrier(); | ||
73 | 72 | ||
74 | /* | 73 | /* |
75 | * Now filter out any obviously spurious interrupts | 74 | * Now filter out any obviously spurious interrupts |