Locking in the clk API

Pavel Machek pavel at ucw.cz
Tue Jan 11 09:34:06 EST 2011


Hi!

> Another solution occurs to me: clk_enable() which returns -EAGAIN if
> it's called in an atomic context but needs to sleep, and let the driver
> deal with the clock not being enabled when it wants it.  The down side
> is it requires the driver to have additional code to sort out such a
> problem.

I do not think that "atomic context" is possible to reliably detect
inside a function like that.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html



More information about the linux-arm-kernel mailing list