# Re: \[PATCH\] Video : Amba: Use in\_interrupt() in clcdfb\_sleep().

- From: richard -rw- weinberger \<hidden\>
- Date: 2012-03-11 13:23:00 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2012/03/3833823
- Thread: https://ratatoskr.run/linux-fbdev/2012/03/3833822/t.md

```text
On Sun, Mar 11, 2012 at 2:14 PM, santosh nayak
[ref] wrote:
> From: Santosh Nayak <redacted>
>
> 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
```
