[PATCH 3/3] iio: accel: bmc150: use iio_push_to_buffers_with_ts()

Yash Suthar <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Replace deprecated iio_push_to_buffers_with_timestamp() with
iio_push_to_buffers_with_ts() to allow source size runtime checks.

Suggested-by: David Lechner <[email protected]>
Signed-off-by: Yash Suthar <[email protected]>
---
 drivers/iio/accel/bmc150-accel-core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
index 30d91d417ac4..476c020c41f0 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -1009,8 +1009,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev,
 			       &data->fifo_buff[i * 3 + bit],
 			       sizeof(data->scan.channels[0]));
 
-		iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
-						   tstamp);
+		iio_push_to_buffers_with_ts(indio_dev, &data->scan,
+					    sizeof(data->scan), tstamp);
 
 		tstamp += sample_period;
 	}
@@ -1191,8 +1191,8 @@ static irqreturn_t bmc150_accel_trigger_handler(int irq, void *p)
 	ret = regmap_bulk_read(data->regmap, BMC150_ACCEL_REG_XOUT_L,
 			       data->scan.channels, AXIS_MAX * 2);
 	if (!ret)
-		iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
-						   pf->timestamp);
+		iio_push_to_buffers_with_ts(indio_dev, &data->scan,
+					    sizeof(data->scan), pf->timestamp);
 	mutex_unlock(&data->mutex);
 
 	iio_trigger_notify_done(indio_dev->trig);
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.