Skip to content

Commit

Permalink
staging:iio:adc:max1363 actually make timestamp controllable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent 117cf8b commit 29bf626
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/iio/adc/max1363_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 29bf626

Please sign in to comment.