From: Jonathan Cameron Date: Sun, 4 Dec 2011 20:44:36 +0000 (+0000) Subject: staging:iio:adc:max1363 actually make timestamp controllable X-Git-Tag: next-20111209~13^2~79 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=29bf6263af04d9c062693622937d45db014f1d13;p=karo-tx-linux.git staging:iio:adc:max1363 actually make timestamp controllable Previously timestamps were always on in this driver. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c index a87fbe8b0ee9..3c5e1999cc24 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);