[PATCH] staging: comedi: ni_mio_common: always lock in ni_ai_poll()
H Hartley Sweeten
hartleys at visionengravers.com
Mon Sep 24 21:14:10 UTC 2012
On Monday, September 24, 2012 8:28 AM, Ian Abbott wrote:
> `ni_ai_poll()` currently acquires (and later releases) the comedi
> device's spin-lock iff `in_interrupt()` returns 0. However, it is only
> called during processing of a `COMEDI_POLL` ioctl so `in_interrupt()`
> will always return 0 in this case. Remove this test and acquire/release
> the spin-lock unconditionally. This eliminates a sparse warning about
> different lock contexts for basic block.
Ian,
How can you guarantee that the user space COMEDI_POLL ioctl wil
never happen when this driver is handling its interrupt?
Maybe a better solution would be for ni_ai_poll() to just return
-EBUSY if it is in_interrupt().
Regards,
Hartley
More information about the devel
mailing list