Re: [PATCH 2.6] meye driver update (wait_ms -> msleep)

From: Stelian Pop
Date: Fri Jul 02 2004 - 10:06:57 EST


On Fri, Jul 02, 2004 at 10:40:30AM -0400, Jeff Garzik wrote:

> >-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);
> >-}
> >-
>
> I was worried about in_interrupt() removal (when you unconditionally
> use msleep), so I reviewed this in-depth. Looks OK to me.

Yup, the in_interrupt() test was reminiscent from a very old
version of the driver, and was wait_ms is not used anymore in
interrupt context, so its replacement by msleep() is safe.

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/