summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/m32r_cfc.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-09-06 10:05:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-09-06 22:00:28 +0100
commitf38bc926d022ebd67baad6ac7fc22c95fbc6238c (patch)
tree807902c14117a60e161adec48ee00dd8c0e74cb6 /drivers/pcmcia/m32r_cfc.c
parented5514c925a0e1266e70630092a77bd0c89aee1f (diff)
downloadblackbird-op-linux-f38bc926d022ebd67baad6ac7fc22c95fbc6238c.tar.gz
blackbird-op-linux-f38bc926d022ebd67baad6ac7fc22c95fbc6238c.zip
staging:iio:sysfs-trigger: Use irq_work to properly active trigger
Since iio_trigger_poll() calls generic_handle_irq() it need to be called from hardirq context. The sysfs trigger is kicked from userspace, so it is obviously not possible to fulfill this requirement by calling iio_trigger_poll directly. As a workaround commit 1f785681 ("staging:iio:trigger sysfs userspace trigger rework.") added iio_trigger_poll_chained() which uses handle_nested_irq instead of generic_handle_irq. This in itself is a hack and only works by chance. handle_nested_irq is intended to be called from the threaded interrupt handler of the parent IRQ. Using handle_nested_irq is also problematic since it will only call the threaded handler of the IRQ. But quite a few IIO drivers rely on their hardirq handler being called or undefined behaviour will occur. This patch uses the irq_work framework to schedule the call to iio_trigger_poll() from hardirq context, which fixes the issues described above. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/pcmcia/m32r_cfc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud