iio: accel: bma220_spi: set up buffer timestamps for non-zero values
authorAlison Schofield <amsfield22@gmail.com>
Mon, 11 Jul 2016 15:25:07 +0000 (08:25 -0700)
committerJonathan Cameron <jic23@kernel.org>
Mon, 15 Aug 2016 14:39:18 +0000 (15:39 +0100)
Use the iio_pollfunc_store_time parameter during triggered buffer
set-up to get valid timestamps.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-By: Tiberiu Breana <tiberiu.a.breana@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/bma220_spi.c

index 1098d10df8e8e2bb6e6b36530a95655ac6d40b8a..5099f295dd378db1236ae5a07c288c2932cbb309 100644 (file)
@@ -253,7 +253,7 @@ static int bma220_probe(struct spi_device *spi)
        if (ret < 0)
                return ret;
 
-       ret = iio_triggered_buffer_setup(indio_dev, NULL,
+       ret = iio_triggered_buffer_setup(indio_dev, iio_pollfunc_store_time,
                                         bma220_trigger_handler, NULL);
        if (ret < 0) {
                dev_err(&spi->dev, "iio triggered buffer setup failed\n");