aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/adc/max1363_ring.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-12-04 20:44:36 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-08 11:33:18 -0800
commit29bf6263af04d9c062693622937d45db014f1d13 (patch)
treedb7c4b8181ee9139420a85a8b078af47b5488267 /drivers/staging/iio/adc/max1363_ring.c
parent117cf8b7e879a33b24b7bea7ca598715c4654846 (diff)
staging:iio:adc:max1363 actually make timestamp controllable
Previously timestamps were always on in this driver. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/adc/max1363_ring.c')
-rw-r--r--drivers/staging/iio/adc/max1363_ring.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c
index a87fbe8b0ee..3c5e1999cc2 100644
--- a/drivers/staging/iio/adc/max1363_ring.c
+++ b/drivers/staging/iio/adc/max1363_ring.c
@@ -138,9 +138,8 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p)
goto done;
time_ns = iio_get_time_ns();
-
- memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns));
-
+ if (indio_dev->buffer->scan_timestamp)
+ memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns));
indio_dev->buffer->access->store_to(indio_dev->buffer, rxbuf, time_ns);
done:
iio_trigger_notify_done(indio_dev->trig);