From: Lars-Peter Clausen Date: Thu, 19 Sep 2013 12:59:00 +0000 (+0100) Subject: iio:ad_sigma_delta: Use iio_push_to_buffers_with_timestamp() X-Git-Tag: MMI-PSA29.97-13-9~13364^2~694^2~31 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a1be505f49cacb288182c7281680ef5f93dea2f7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git iio:ad_sigma_delta: Use iio_push_to_buffers_with_timestamp() Makes the code a bit shorter and less ugly. Signed-off-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index 78d276f40c8e..2b5911274763 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c @@ -368,10 +368,6 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p) memset(data, 0x00, 16); - /* Guaranteed to be aligned with 8 byte boundary */ - if (indio_dev->scan_timestamp) - ((s64 *)data)[1] = pf->timestamp; - reg_size = indio_dev->channels[0].scan_type.realbits + indio_dev->channels[0].scan_type.shift; reg_size = DIV_ROUND_UP(reg_size, 8); @@ -391,7 +387,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p) break; } - iio_push_to_buffers(indio_dev, data); + iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp); iio_trigger_notify_done(indio_dev->trig); sigma_delta->irq_dis = false;