aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-09-04 08:38:00 -0400
committerJonathan Cameron <jic23@kernel.org>2012-09-08 05:14:34 -0400
commitce56ade6ae74e604a4b5d6ea5b1d58960fa8e7aa (patch)
tree78d2013d24bb0b1afece98e27c9be2885c706d27
parenta0d7bf7dd1b37ccd6804cd62ca037c1efe3b2e27 (diff)
iio: Drop timestamp parameter from buffer store_to callback
Drop timestamp parameter from buffer store_to callback and subsequently from iio_push_to_buffer. The timestamp parameter is unused and it seems likely that it will stay unused in the future, so it should be safe to remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/accel/hid-sensor-accel-3d.c3
-rw-r--r--drivers/iio/adc/ad7266.c2
-rw-r--r--drivers/iio/adc/ad_sigma_delta.c2
-rw-r--r--drivers/iio/adc/at91_adc.c2
-rw-r--r--drivers/iio/gyro/hid-sensor-gyro-3d.c3
-rw-r--r--drivers/iio/industrialio-buffer.c5
-rw-r--r--drivers/iio/kfifo_buf.c3
-rw-r--r--drivers/iio/light/adjd_s311.c2
-rw-r--r--drivers/iio/light/hid-sensor-als.c3
-rw-r--r--drivers/iio/magnetometer/hid-sensor-magn-3d.c3
-rw-r--r--drivers/staging/iio/accel/adis16201_ring.c2
-rw-r--r--drivers/staging/iio/accel/adis16203_ring.c2
-rw-r--r--drivers/staging/iio/accel/adis16204_ring.c2
-rw-r--r--drivers/staging/iio/accel/adis16209_ring.c2
-rw-r--r--drivers/staging/iio/accel/adis16240_ring.c2
-rw-r--r--drivers/staging/iio/accel/lis3l02dq_ring.c2
-rw-r--r--drivers/staging/iio/adc/ad7298_ring.c2
-rw-r--r--drivers/staging/iio/adc/ad7476_ring.c2
-rw-r--r--drivers/staging/iio/adc/ad7606_ring.c2
-rw-r--r--drivers/staging/iio/adc/ad7887_ring.c2
-rw-r--r--drivers/staging/iio/adc/ad799x_ring.c2
-rw-r--r--drivers/staging/iio/adc/max1363_ring.c2
-rw-r--r--drivers/staging/iio/adc/mxs-lradc.c2
-rw-r--r--drivers/staging/iio/gyro/adis16260_ring.c2
-rw-r--r--drivers/staging/iio/iio_simple_dummy_buffer.c2
-rw-r--r--drivers/staging/iio/impedance-analyzer/ad5933.c2
-rw-r--r--drivers/staging/iio/imu/adis16400_ring.c2
-rw-r--r--drivers/staging/iio/meter/ade7758_ring.c2
-rw-r--r--drivers/staging/iio/ring_sw.c7
-rw-r--r--include/linux/iio/buffer.h6
30 files changed, 34 insertions, 43 deletions
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index c593eb239270..314a4057879e 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -198,7 +198,6 @@ static const struct iio_info accel_3d_info = {
198static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) 198static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
199{ 199{
200 struct iio_buffer *buffer = indio_dev->buffer; 200 struct iio_buffer *buffer = indio_dev->buffer;
201 s64 timestamp = iio_get_time_ns();
202 int datum_sz; 201 int datum_sz;
203 202
204 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); 203 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
@@ -212,7 +211,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
212 datum_sz); 211 datum_sz);
213 return; 212 return;
214 } 213 }
215 iio_push_to_buffer(buffer, (u8 *)data, timestamp); 214 iio_push_to_buffer(buffer, (u8 *)data);
216} 215}
217 216
218/* Callback handler to send event after all samples are received and captured */ 217/* Callback handler to send event after all samples are received and captured */
diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c
index 5c3f1ba5a06d..b11f214779a2 100644
--- a/drivers/iio/adc/ad7266.c
+++ b/drivers/iio/adc/ad7266.c
@@ -99,7 +99,7 @@ static irqreturn_t ad7266_trigger_handler(int irq, void *p)
99 if (ret == 0) { 99 if (ret == 0) {
100 if (indio_dev->scan_timestamp) 100 if (indio_dev->scan_timestamp)
101 ((s64 *)st->data)[1] = pf->timestamp; 101 ((s64 *)st->data)[1] = pf->timestamp;
102 iio_push_to_buffer(buffer, (u8 *)st->data, pf->timestamp); 102 iio_push_to_buffer(buffer, (u8 *)st->data);
103 } 103 }
104 104
105 iio_trigger_notify_done(indio_dev->trig); 105 iio_trigger_notify_done(indio_dev->trig);
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index ae847c5a1361..67baa1363d7a 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -391,7 +391,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
391 break; 391 break;
392 } 392 }
393 393
394 iio_push_to_buffer(indio_dev->buffer, (uint8_t *)data, pf->timestamp); 394 iio_push_to_buffer(indio_dev->buffer, (uint8_t *)data);
395 395
396 iio_trigger_notify_done(indio_dev->trig); 396 iio_trigger_notify_done(indio_dev->trig);
397 sigma_delta->irq_dis = false; 397 sigma_delta->irq_dis = false;
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index c1e4690f188d..bc10091fe76c 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -82,7 +82,7 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p)
82 *timestamp = pf->timestamp; 82 *timestamp = pf->timestamp;
83 } 83 }
84 84
85 buffer->access->store_to(buffer, (u8 *)st->buffer, pf->timestamp); 85 buffer->access->store_to(buffer, (u8 *)st->buffer);
86 86
87 iio_trigger_notify_done(idev->trig); 87 iio_trigger_notify_done(idev->trig);
88 st->irq_enabled = true; 88 st->irq_enabled = true;
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index 94a4740135e7..4c56ada51c39 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -198,7 +198,6 @@ static const struct iio_info gyro_3d_info = {
198static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) 198static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
199{ 199{
200 struct iio_buffer *buffer = indio_dev->buffer; 200 struct iio_buffer *buffer = indio_dev->buffer;
201 s64 timestamp = iio_get_time_ns();
202 int datum_sz; 201 int datum_sz;
203 202
204 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); 203 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
@@ -212,7 +211,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
212 datum_sz); 211 datum_sz);
213 return; 212 return;
214 } 213 }
215 iio_push_to_buffer(buffer, (u8 *)data, timestamp); 214 iio_push_to_buffer(buffer, (u8 *)data);
216} 215}
217 216
218/* Callback handler to send event after all samples are received and captured */ 217/* Callback handler to send event after all samples are received and captured */
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 774891cf8139..d4ad37455a67 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -682,12 +682,11 @@ static unsigned char *iio_demux(struct iio_buffer *buffer,
682 return buffer->demux_bounce; 682 return buffer->demux_bounce;
683} 683}
684 684
685int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data, 685int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data)
686 s64 timestamp)
687{ 686{
688 unsigned char *dataout = iio_demux(buffer, data); 687 unsigned char *dataout = iio_demux(buffer, data);
689 688
690 return buffer->access->store_to(buffer, dataout, timestamp); 689 return buffer->access->store_to(buffer, dataout);
691} 690}
692EXPORT_SYMBOL_GPL(iio_push_to_buffer); 691EXPORT_SYMBOL_GPL(iio_push_to_buffer);
693 692
diff --git a/drivers/iio/kfifo_buf.c b/drivers/iio/kfifo_buf.c
index 63da42498a9a..5bc5c860e9ca 100644
--- a/drivers/iio/kfifo_buf.c
+++ b/drivers/iio/kfifo_buf.c
@@ -95,8 +95,7 @@ static int iio_set_length_kfifo(struct iio_buffer *r, int length)
95} 95}
96 96
97static int iio_store_to_kfifo(struct iio_buffer *r, 97static int iio_store_to_kfifo(struct iio_buffer *r,
98 u8 *data, 98 u8 *data)
99 s64 timestamp)
100{ 99{
101 int ret; 100 int ret;
102 struct iio_kfifo *kf = iio_to_kfifo(r); 101 struct iio_kfifo *kf = iio_to_kfifo(r);
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c
index 9a99f43094f0..164b62b91a4b 100644
--- a/drivers/iio/light/adjd_s311.c
+++ b/drivers/iio/light/adjd_s311.c
@@ -187,7 +187,7 @@ static irqreturn_t adjd_s311_trigger_handler(int irq, void *p)
187 if (indio_dev->scan_timestamp) 187 if (indio_dev->scan_timestamp)
188 *(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64))) 188 *(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64)))
189 = time_ns; 189 = time_ns;
190 iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns); 190 iio_push_to_buffer(buffer, (u8 *)data->buffer);
191 191
192done: 192done:
193 iio_trigger_notify_done(indio_dev->trig); 193 iio_trigger_notify_done(indio_dev->trig);
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index b3c8e91b2c8d..96e3691e42c4 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -177,7 +177,6 @@ static const struct iio_info als_info = {
177static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) 177static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
178{ 178{
179 struct iio_buffer *buffer = indio_dev->buffer; 179 struct iio_buffer *buffer = indio_dev->buffer;
180 s64 timestamp = iio_get_time_ns();
181 int datum_sz; 180 int datum_sz;
182 181
183 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); 182 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
@@ -191,7 +190,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
191 datum_sz); 190 datum_sz);
192 return; 191 return;
193 } 192 }
194 iio_push_to_buffer(buffer, (u8 *)data, timestamp); 193 iio_push_to_buffer(buffer, (u8 *)data);
195} 194}
196 195
197/* Callback handler to send event after all samples are received and captured */ 196/* Callback handler to send event after all samples are received and captured */
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
index 397704eded97..c4f0d274f577 100644
--- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
+++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
@@ -199,7 +199,6 @@ static const struct iio_info magn_3d_info = {
199static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len) 199static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
200{ 200{
201 struct iio_buffer *buffer = indio_dev->buffer; 201 struct iio_buffer *buffer = indio_dev->buffer;
202 s64 timestamp = iio_get_time_ns();
203 int datum_sz; 202 int datum_sz;
204 203
205 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); 204 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n");
@@ -213,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
213 datum_sz); 212 datum_sz);
214 return; 213 return;
215 } 214 }
216 iio_push_to_buffer(buffer, (u8 *)data, timestamp); 215 iio_push_to_buffer(buffer, (u8 *)data);
217} 216}
218 217
219/* Callback handler to send event after all samples are received and captured */ 218/* Callback handler to send event after all samples are received and captured */
diff --git a/drivers/staging/iio/accel/adis16201_ring.c b/drivers/staging/iio/accel/adis16201_ring.c
index 884dcf89bce3..97c09f0c26ae 100644
--- a/drivers/staging/iio/accel/adis16201_ring.c
+++ b/drivers/staging/iio/accel/adis16201_ring.c
@@ -82,7 +82,7 @@ static irqreturn_t adis16201_trigger_handler(int irq, void *p)
82 if (indio_dev->scan_timestamp) 82 if (indio_dev->scan_timestamp)
83 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; 83 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
84 84
85 iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp); 85 iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
86 86
87 kfree(data); 87 kfree(data);
88done: 88done:
diff --git a/drivers/staging/iio/accel/adis16203_ring.c b/drivers/staging/iio/accel/adis16203_ring.c
index a7ff80490c47..7507e1a04591 100644
--- a/drivers/staging/iio/accel/adis16203_ring.c
+++ b/drivers/staging/iio/accel/adis16203_ring.c
@@ -81,7 +81,7 @@ static irqreturn_t adis16203_trigger_handler(int irq, void *p)
81 if (indio_dev->scan_timestamp) 81 if (indio_dev->scan_timestamp)
82 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; 82 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
83 83
84 iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp); 84 iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
85 85
86 kfree(data); 86 kfree(data);
87done: 87done:
diff --git a/drivers/staging/iio/accel/adis16204_ring.c b/drivers/staging/iio/accel/adis16204_ring.c
index 16e36e3e9d33..4c976bec986b 100644
--- a/drivers/staging/iio/accel/adis16204_ring.c
+++ b/drivers/staging/iio/accel/adis16204_ring.c
@@ -78,7 +78,7 @@ static irqreturn_t adis16204_trigger_handler(int irq, void *p)
78 if (indio_dev->scan_timestamp) 78 if (indio_dev->scan_timestamp)
79 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; 79 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
80 80
81 iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp); 81 iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
82 82
83 kfree(data); 83 kfree(data);
84done: 84done:
diff --git a/drivers/staging/iio/accel/adis16209_ring.c b/drivers/staging/iio/accel/adis16209_ring.c
index 5cfeff40fcf6..f939e29d6c82 100644
--- a/drivers/staging/iio/accel/adis16209_ring.c
+++ b/drivers/staging/iio/accel/adis16209_ring.c
@@ -78,7 +78,7 @@ static irqreturn_t adis16209_trigger_handler(int irq, void *p)
78 if (indio_dev->scan_timestamp) 78 if (indio_dev->scan_timestamp)
79 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; 79 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
80 80
81 iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp); 81 iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
82 82
83 kfree(data); 83 kfree(data);
84done: 84done:
diff --git a/drivers/staging/iio/accel/adis16240_ring.c b/drivers/staging/iio/accel/adis16240_ring.c
index d5ec43e877b5..caff8e25e0a2 100644
--- a/drivers/staging/iio/accel/adis16240_ring.c
+++ b/drivers/staging/iio/accel/adis16240_ring.c
@@ -76,7 +76,7 @@ static irqreturn_t adis16240_trigger_handler(int irq, void *p)
76 if (indio_dev->scan_timestamp) 76 if (indio_dev->scan_timestamp)
77 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; 77 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
78 78
79 iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp); 79 iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
80 80
81 kfree(data); 81 kfree(data);
82done: 82done:
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
index 9332762da718..247605ce5051 100644
--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
+++ b/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -152,7 +152,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p)
152 if (indio_dev->scan_timestamp) 152 if (indio_dev->scan_timestamp)
153 *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64))) 153 *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
154 = pf->timestamp; 154 = pf->timestamp;
155 iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp); 155 iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
156 156
157 kfree(data); 157 kfree(data);
158done: 158done:
diff --git a/drivers/staging/iio/adc/ad7298_ring.c b/drivers/staging/iio/adc/ad7298_ring.c
index 9fce4045cbb9..c2906a85fedb 100644
--- a/drivers/staging/iio/adc/ad7298_ring.c
+++ b/drivers/staging/iio/adc/ad7298_ring.c
@@ -93,7 +93,7 @@ static irqreturn_t ad7298_trigger_handler(int irq, void *p)
93 indio_dev->masklength); i++) 93 indio_dev->masklength); i++)
94 buf[i] = be16_to_cpu(st->rx_buf[i]); 94 buf[i] = be16_to_cpu(st->rx_buf[i]);
95 95
96 iio_push_to_buffer(indio_dev->buffer, (u8 *)buf, time_ns); 96 iio_push_to_buffer(indio_dev->buffer, (u8 *)buf);
97 97
98done: 98done:
99 iio_trigger_notify_done(indio_dev->trig); 99 iio_trigger_notify_done(indio_dev->trig);
diff --git a/drivers/staging/iio/adc/ad7476_ring.c b/drivers/staging/iio/adc/ad7476_ring.c
index 3741ac6131db..940681f29b87 100644
--- a/drivers/staging/iio/adc/ad7476_ring.c
+++ b/drivers/staging/iio/adc/ad7476_ring.c
@@ -44,7 +44,7 @@ static irqreturn_t ad7476_trigger_handler(int irq, void *p)
44 memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64), 44 memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
45 &time_ns, sizeof(time_ns)); 45 &time_ns, sizeof(time_ns));
46 46
47 iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns); 47 iio_push_to_buffer(indio_dev->buffer, rxbuf);
48done: 48done:
49 iio_trigger_notify_done(indio_dev->trig); 49 iio_trigger_notify_done(indio_dev->trig);
50 kfree(rxbuf); 50 kfree(rxbuf);
diff --git a/drivers/staging/iio/adc/ad7606_ring.c b/drivers/staging/iio/adc/ad7606_ring.c
index f4b009ee6635..ba04d0ffd4f4 100644
--- a/drivers/staging/iio/adc/ad7606_ring.c
+++ b/drivers/staging/iio/adc/ad7606_ring.c
@@ -83,7 +83,7 @@ static void ad7606_poll_bh_to_ring(struct work_struct *work_s)
83 if (indio_dev->scan_timestamp) 83 if (indio_dev->scan_timestamp)
84 *((s64 *)(buf + indio_dev->scan_bytes - sizeof(s64))) = time_ns; 84 *((s64 *)(buf + indio_dev->scan_bytes - sizeof(s64))) = time_ns;
85 85
86 iio_push_to_buffer(indio_dev->buffer, buf, time_ns); 86 iio_push_to_buffer(indio_dev->buffer, buf);
87done: 87done:
88 gpio_set_value(st->pdata->gpio_convst, 0); 88 gpio_set_value(st->pdata->gpio_convst, 0);
89 iio_trigger_notify_done(indio_dev->trig); 89 iio_trigger_notify_done(indio_dev->trig);
diff --git a/drivers/staging/iio/adc/ad7887_ring.c b/drivers/staging/iio/adc/ad7887_ring.c
index a4ff4935982d..b39923bbeedc 100644
--- a/drivers/staging/iio/adc/ad7887_ring.c
+++ b/drivers/staging/iio/adc/ad7887_ring.c
@@ -95,7 +95,7 @@ static irqreturn_t ad7887_trigger_handler(int irq, void *p)
95 memcpy(buf + indio_dev->scan_bytes - sizeof(s64), 95 memcpy(buf + indio_dev->scan_bytes - sizeof(s64),
96 &time_ns, sizeof(time_ns)); 96 &time_ns, sizeof(time_ns));
97 97
98 iio_push_to_buffer(indio_dev->buffer, buf, time_ns); 98 iio_push_to_buffer(indio_dev->buffer, buf);
99done: 99done:
100 kfree(buf); 100 kfree(buf);
101 iio_trigger_notify_done(indio_dev->trig); 101 iio_trigger_notify_done(indio_dev->trig);
diff --git a/drivers/staging/iio/adc/ad799x_ring.c b/drivers/staging/iio/adc/ad799x_ring.c
index 84275c3c6b26..86026d9b20bc 100644
--- a/drivers/staging/iio/adc/ad799x_ring.c
+++ b/drivers/staging/iio/adc/ad799x_ring.c
@@ -77,7 +77,7 @@ static irqreturn_t ad799x_trigger_handler(int irq, void *p)
77 memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64), 77 memcpy(rxbuf + indio_dev->scan_bytes - sizeof(s64),
78 &time_ns, sizeof(time_ns)); 78 &time_ns, sizeof(time_ns));
79 79
80 iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns); 80 iio_push_to_buffer(indio_dev->buffer, rxbuf);
81done: 81done:
82 kfree(rxbuf); 82 kfree(rxbuf);
83out: 83out:
diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c
index 774ae1b63550..5f74f3b7671a 100644
--- a/drivers/staging/iio/adc/max1363_ring.c
+++ b/drivers/staging/iio/adc/max1363_ring.c
@@ -80,7 +80,7 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p)
80 80
81 if (indio_dev->scan_timestamp) 81 if (indio_dev->scan_timestamp)
82 memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns)); 82 memcpy(rxbuf + d_size - sizeof(s64), &time_ns, sizeof(time_ns));
83 iio_push_to_buffer(indio_dev->buffer, rxbuf, time_ns); 83 iio_push_to_buffer(indio_dev->buffer, rxbuf);
84 84
85done_free: 85done_free:
86 kfree(rxbuf); 86 kfree(rxbuf);
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index ae549e572e5d..ca7c1fa88e71 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -256,7 +256,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p)
256 *timestamp = pf->timestamp; 256 *timestamp = pf->timestamp;
257 } 257 }
258 258
259 iio_push_to_buffer(buffer, (u8 *)lradc->buffer, pf->timestamp); 259 iio_push_to_buffer(buffer, (u8 *)lradc->buffer);
260 260
261 iio_trigger_notify_done(iio->trig); 261 iio_trigger_notify_done(iio->trig);
262 262
diff --git a/drivers/staging/iio/gyro/adis16260_ring.c b/drivers/staging/iio/gyro/adis16260_ring.c
index e6e234503824..e294cb49736d 100644
--- a/drivers/staging/iio/gyro/adis16260_ring.c
+++ b/drivers/staging/iio/gyro/adis16260_ring.c
@@ -81,7 +81,7 @@ static irqreturn_t adis16260_trigger_handler(int irq, void *p)
81 if (indio_dev->scan_timestamp) 81 if (indio_dev->scan_timestamp)
82 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; 82 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
83 83
84 iio_push_to_buffer(indio_dev->buffer, (u8 *)data, pf->timestamp); 84 iio_push_to_buffer(indio_dev->buffer, (u8 *)data);
85 85
86 kfree(data); 86 kfree(data);
87done: 87done:
diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c b/drivers/staging/iio/iio_simple_dummy_buffer.c
index e08021362ecf..1fd38095b2ca 100644
--- a/drivers/staging/iio/iio_simple_dummy_buffer.c
+++ b/drivers/staging/iio/iio_simple_dummy_buffer.c
@@ -87,7 +87,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p)
87 if (indio_dev->scan_timestamp) 87 if (indio_dev->scan_timestamp)
88 *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64))) 88 *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
89 = iio_get_time_ns(); 89 = iio_get_time_ns();
90 iio_push_to_buffer(buffer, (u8 *)data, pf->timestamp); 90 iio_push_to_buffer(buffer, (u8 *)data);
91 91
92 kfree(data); 92 kfree(data);
93 93
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index 39a9be8b7d8e..de21d47f33e9 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -678,7 +678,7 @@ static void ad5933_work(struct work_struct *work)
678 buf[0] = be16_to_cpu(buf[0]); 678 buf[0] = be16_to_cpu(buf[0]);
679 } 679 }
680 /* save datum to the ring */ 680 /* save datum to the ring */
681 iio_push_to_buffer(ring, (u8 *)buf, iio_get_time_ns()); 681 iio_push_to_buffer(ring, (u8 *)buf);
682 } else { 682 } else {
683 /* no data available - try again later */ 683 /* no data available - try again later */
684 schedule_delayed_work(&st->work, st->poll_time_jiffies); 684 schedule_delayed_work(&st->work, st->poll_time_jiffies);
diff --git a/drivers/staging/iio/imu/adis16400_ring.c b/drivers/staging/iio/imu/adis16400_ring.c
index 6b717886b5b4..260bdd1a4681 100644
--- a/drivers/staging/iio/imu/adis16400_ring.c
+++ b/drivers/staging/iio/imu/adis16400_ring.c
@@ -150,7 +150,7 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p)
150 /* Guaranteed to be aligned with 8 byte boundary */ 150 /* Guaranteed to be aligned with 8 byte boundary */
151 if (ring->scan_timestamp) 151 if (ring->scan_timestamp)
152 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp; 152 *((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
153 iio_push_to_buffer(ring, (u8 *) data, pf->timestamp); 153 iio_push_to_buffer(ring, (u8 *) data);
154 154
155done: 155done:
156 kfree(data); 156 kfree(data);
diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c
index 23c107a09ceb..9e49baccf660 100644
--- a/drivers/staging/iio/meter/ade7758_ring.c
+++ b/drivers/staging/iio/meter/ade7758_ring.c
@@ -73,7 +73,7 @@ static irqreturn_t ade7758_trigger_handler(int irq, void *p)
73 if (indio_dev->scan_timestamp) 73 if (indio_dev->scan_timestamp)
74 dat64[1] = pf->timestamp; 74 dat64[1] = pf->timestamp;
75 75
76 iio_push_to_buffer(indio_dev->buffer, (u8 *)dat64, pf->timestamp); 76 iio_push_to_buffer(indio_dev->buffer, (u8 *)dat64);
77 77
78 iio_trigger_notify_done(indio_dev->trig); 78 iio_trigger_notify_done(indio_dev->trig);
79 79
diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c
index f61c8fdaab06..3a45f9a52de8 100644
--- a/drivers/staging/iio/ring_sw.c
+++ b/drivers/staging/iio/ring_sw.c
@@ -65,7 +65,7 @@ static inline void __iio_free_sw_ring_buffer(struct iio_sw_ring_buffer *ring)
65/* Lock always held if their is a chance this may be called */ 65/* Lock always held if their is a chance this may be called */
66/* Only one of these per ring may run concurrently - enforced by drivers */ 66/* Only one of these per ring may run concurrently - enforced by drivers */
67static int iio_store_to_sw_ring(struct iio_sw_ring_buffer *ring, 67static int iio_store_to_sw_ring(struct iio_sw_ring_buffer *ring,
68 unsigned char *data, s64 timestamp) 68 unsigned char *data)
69{ 69{
70 int ret = 0; 70 int ret = 0;
71 unsigned char *temp_ptr, *change_test_ptr; 71 unsigned char *temp_ptr, *change_test_ptr;
@@ -256,11 +256,10 @@ error_ret:
256} 256}
257 257
258static int iio_store_to_sw_rb(struct iio_buffer *r, 258static int iio_store_to_sw_rb(struct iio_buffer *r,
259 u8 *data, 259 u8 *data)
260 s64 timestamp)
261{ 260{
262 struct iio_sw_ring_buffer *ring = iio_to_sw_ring(r); 261 struct iio_sw_ring_buffer *ring = iio_to_sw_ring(r);
263 return iio_store_to_sw_ring(ring, data, timestamp); 262 return iio_store_to_sw_ring(ring, data);
264} 263}
265 264
266static int iio_request_update_sw_rb(struct iio_buffer *r) 265static int iio_request_update_sw_rb(struct iio_buffer *r)
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
index 8ba516fc2ec6..c629b3a1d9a9 100644
--- a/include/linux/iio/buffer.h
+++ b/include/linux/iio/buffer.h
@@ -36,7 +36,7 @@ struct iio_buffer;
36 * any of them not existing. 36 * any of them not existing.
37 **/ 37 **/
38struct iio_buffer_access_funcs { 38struct iio_buffer_access_funcs {
39 int (*store_to)(struct iio_buffer *buffer, u8 *data, s64 timestamp); 39 int (*store_to)(struct iio_buffer *buffer, u8 *data);
40 int (*read_first_n)(struct iio_buffer *buffer, 40 int (*read_first_n)(struct iio_buffer *buffer,
41 size_t n, 41 size_t n,
42 char __user *buf); 42 char __user *buf);
@@ -118,10 +118,8 @@ int iio_scan_mask_set(struct iio_dev *indio_dev,
118 * iio_push_to_buffer() - push to a registered buffer. 118 * iio_push_to_buffer() - push to a registered buffer.
119 * @buffer: IIO buffer structure for device 119 * @buffer: IIO buffer structure for device
120 * @data: the data to push to the buffer 120 * @data: the data to push to the buffer
121 * @timestamp: timestamp to associate with the data
122 */ 121 */
123int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data, 122int iio_push_to_buffer(struct iio_buffer *buffer, unsigned char *data);
124 s64 timestamp);
125 123
126int iio_update_demux(struct iio_dev *indio_dev); 124int iio_update_demux(struct iio_dev *indio_dev);
127 125