linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging:iio:adc:max1363 actually make timestamp controllable
@ 2011-11-27 12:22 Jonathan Cameron
  2011-12-04 20:44 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Cameron @ 2011-11-27 12:22 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

From: Jonathan Cameron <jic23@cam.ac.uk>

Previously timestamps were always on in this driver.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
---
A random minor fixlet that has been in my tree far too long.

 drivers/staging/iio/adc/max1363_ring.c |    5 ++---
 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 a87fbe8..3c5e199 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);
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging:iio:adc:max1363 actually make timestamp controllable
  2011-11-27 12:22 [PATCH] staging:iio:adc:max1363 actually make timestamp controllable Jonathan Cameron
@ 2011-12-04 20:44 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2011-12-04 20:44 UTC (permalink / raw)
  To: linux-iio

gone to Greg
> From: Jonathan Cameron <jic23@cam.ac.uk>
> 
> Previously timestamps were always on in this driver.
> 
> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
> A random minor fixlet that has been in my tree far too long.
> 
>  drivers/staging/iio/adc/max1363_ring.c |    5 ++---
>  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 a87fbe8..3c5e199 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);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-04 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27 12:22 [PATCH] staging:iio:adc:max1363 actually make timestamp controllable Jonathan Cameron
2011-12-04 20:44 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).