Re: [PATCH] Use msleep in meye driver
From: Stelian Pop
Date: Thu Jun 03 2004 - 03:40:20 EST
On Wed, Jun 02, 2004 at 04:57:26PM +0100, Daniel Drake wrote:
> Remove meye's definition of wait_ms() and switch to using the new global
> msleep() function.
[...]
> -static inline void wait_ms(unsigned int ms) {
> - if (!in_interrupt()) {
> - set_current_state(TASK_UNINTERRUPTIBLE);
> - schedule_timeout(1 + ms * HZ / 1000);
> - }
> - else
> - mdelay(ms);
> -}
>From what I see in kernel/timer.c, msleep() cannot be called in
interrupt context, so the in_interrupt() test must stay.
Stelian.
--
Stelian Pop <stelian@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/