Messages in this thread | | | Date | Sun, 11 Mar 2012 14:22:57 +0100 | Subject | Re: [PATCH] Video : Amba: Use in_interrupt() in clcdfb_sleep(). | From | richard -rw- weinberger <> |
| |
On Sun, Mar 11, 2012 at 2:14 PM, santosh nayak <santoshprasadnayak@gmail.com> wrote: > From: Santosh Nayak <santoshprasadnayak@gmail.com> > > Instead of "in_atomic()", we can use in_interrupt() to check whether > its an interrupt context.
What is the benefit?
Your change turns clcdfb_sleep() into a ticking bomb. If clcdfb_sleep() is called from an atomic section (e.g. under a spinlock) it will call msleep() and the whole thing explodes...
-- Thanks, //richard
| |