Re: Flash chip locking

David Woodhouse
2000-11-04T19:26:57Z

On Thu, 12 Oct 2000, Alice Hennessy wrote:

> Was the "has the erase finished yet?" timer the only reason for using
> spin_lock_bh instead of spin_lock? Since the timer isn't implemented yet,
> spin_lock can be used at the moment, correct? I'm experimenting with the
> driver in an environment that can only tolerate disabling the bottom half for
> very brief periods.

Actually, even in the case where the timer _may_ be used, it's safe to
check whether a timer is _actually_ pending and only disable bottom halves
if it is. Because you hold the spinlock you know no other routine is going
to set a timer until you've finished.

--
dwmw2