Messages in this thread | | | Date | Fri, 2 Jul 2004 17:04:57 +0200 | From | Stelian Pop <> | Subject | Re: [PATCH 2.6] meye driver update (wait_ms -> msleep) |
| |
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@popies.net> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |