History

[PATCH] Using msleep() instead of HZ

Use msleep() in a few places.

Luca Falavigna committed 21 years ago

Commit 47f176f1 parent 8d451682 files · +8 −17Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/irq/autoprobe.c+4−5
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 #include <linux/irq.h>
1010 #include <linux/module.h>
1111 #include <linux/interrupt.h>
12+#include <linux/delay.h>
1213
1314 /*
1415 * Autodetection depends on the fact that any interrupt that
@@ -26,7 +27,7 @@ static DECLARE_MUTEX(probe_sem); · 11 unmodified lines
2627 */
2728 unsigned long probe_irq_on(void)
2829 {
29− unsigned long val, delay;
30+ unsigned long val;
3031 irq_desc_t *desc;
3132 unsigned int i;
3233
@@ -45,8 +46,7 @@ unsigned long probe_irq_on(void) · 12 unmodified lines
4546 }
4647
4748 /* Wait for longstanding interrupts to trigger. */
48− for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
49− /* about 20ms delay */ barrier();
49+ msleep(20);
5050
5151 /*
5252 * enable any unassigned irqs
@@ -68,8 +68,7 @@ unsigned long probe_irq_on(void) · 15 unmodified lines
6868 /*
6969 * Wait for spurious interrupts to trigger
7070 */
71− for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
72− /* about 100ms delay */ barrier();
71+ msleep(100);
7372
7473 /*
7574 * Now filter out any obviously spurious interrupts