lkml.org 
[lkml]   [2004]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.027 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site