iio: proximity: as3935: fix iio_trigger_poll issue
authorMatt Ranostay <matt.ranostay@konsulko.com>
Fri, 5 May 2017 00:32:19 +0000 (17:32 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sun, 7 May 2017 12:21:55 +0000 (13:21 +0100)
commit9122b54f266ddee09654fe3fbc503c1a60f4a01c
treef1f8c7c4c432b9fae188731ccf4e3a887dfa7f5b
parent275292d3a3d62670b1b13484707b74e5239b4bb0
iio: proximity: as3935: fix iio_trigger_poll issue

Using iio_trigger_poll() can oops when multiple interrupts
happen before the first is handled.

Use iio_trigger_poll_chained() instead and use the timestamp
when processed, since it will be in theory be 2 ms max latency.

Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support")
Cc: stable@vger.kernel.org
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/proximity/as3935.c