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)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:55:45 +0000 (02:55 +0000)
commita6e34136a3555021ba2a21123b6a1eb4ee44b0b7
treebf0315cd4fc8f5e094b657db8ce60a79537a6904
parent977f587be4dfa41e44c56252b383aa7242a9f6f8
iio: proximity: as3935: fix iio_trigger_poll issue

commit 9122b54f266ddee09654fe3fbc503c1a60f4a01c upstream.

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")
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/proximity/as3935.c