From: Lars-Peter Clausen Date: Thu, 19 Sep 2013 12:59:00 +0000 (+0100) Subject: iio:tcs3472: Use iio_push_to_buffers_with_timestamp() X-Git-Tag: v3.13-rc1~170^2~694^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0624bf847dd0ddc9bf71ccb9d1a6fffa9e5a8dd0;p=platform%2Fkernel%2Flinux-exynos.git iio:tcs3472: Use iio_push_to_buffers_with_timestamp() Makes the code a bit shorter and less ugly. Signed-off-by: Lars-Peter Clausen Cc: Peter Meerwald Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c index 0b4ed57..45df220 100644 --- a/drivers/iio/light/tcs3472.c +++ b/drivers/iio/light/tcs3472.c @@ -192,10 +192,8 @@ static irqreturn_t tcs3472_trigger_handler(int irq, void *p) len += 2; } - if (indio_dev->scan_timestamp) - *(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64))) - = iio_get_time_ns(); - iio_push_to_buffers(indio_dev, data->buffer); + iio_push_to_buffers_with_timestamp(indio_dev, data->buffer, + iio_get_time_ns()); done: iio_trigger_notify_done(indio_dev->trig);