mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
[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>
This commit is contained in:
parent
8d451687ca
commit
47f176fdaf
2 changed files with 8 additions and 17 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/irq.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
/*
|
||||
* Autodetection depends on the fact that any interrupt that
|
||||
|
|
@ -26,7 +27,7 @@ static DECLARE_MUTEX(probe_sem);
|
|||
*/
|
||||
unsigned long probe_irq_on(void)
|
||||
{
|
||||
unsigned long val, delay;
|
||||
unsigned long val;
|
||||
irq_desc_t *desc;
|
||||
unsigned int i;
|
||||
|
||||
|
|
@ -45,8 +46,7 @@ unsigned long probe_irq_on(void)
|
|||
}
|
||||
|
||||
/* Wait for longstanding interrupts to trigger. */
|
||||
for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
|
||||
/* about 20ms delay */ barrier();
|
||||
msleep(20);
|
||||
|
||||
/*
|
||||
* enable any unassigned irqs
|
||||
|
|
@ -68,8 +68,7 @@ unsigned long probe_irq_on(void)
|
|||
/*
|
||||
* Wait for spurious interrupts to trigger
|
||||
*/
|
||||
for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
|
||||
/* about 100ms delay */ barrier();
|
||||
msleep(100);
|
||||
|
||||
/*
|
||||
* Now filter out any obviously spurious interrupts
|
||||
|
|
|
|||
Loading…
Reference in a new issue