Linux IIO development
 help / color / mirror / Atom feed
From: Yash Suthar <yashsuthar983@gmail.com>
To: jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	andriy.shevchenko@intel.com, grondon@gmail.com,
	linusw@kernel.org, hexlabsecurity@proton.me,
	sakari.ailus@linux.intel.com,
	srinivas.pandruvada@linux.intel.com, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Yash Suthar <yashsuthar983@gmail.com>
Subject: [PATCH v3 3/3] iio: accel: bmc150: use iio_push_to_buffers_with_ts()
Date: Tue, 25 Aug 2026 14:21:56 +0530	[thread overview]
Message-ID: <20260825085156.212042-4-yashsuthar983@gmail.com> (raw)
In-Reply-To: <20260825085156.212042-1-yashsuthar983@gmail.com>

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 <dlechner@baylibre.com>
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
---
 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 4c98f840e626..e487e1b9239b 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -1008,8 +1008,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;
 	}
@@ -1193,8 +1193,8 @@ static irqreturn_t bmc150_accel_trigger_handler(int irq, void *p)
 	if (ret < 0)
 		goto err_read;
 
-	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);
 err_read:
 	mutex_unlock(&data->mutex);
 	iio_trigger_notify_done(indio_dev->trig);
-- 
2.43.0


  parent reply	other threads:[~2026-08-25  8:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  8:51 [PATCH v3 0/3] iio: accel: bmc150: DMA-safe buffers and use iio_push_to_buffers_with_ts() Yash Suthar
2026-08-25  8:51 ` [PATCH v3 1/3] iio: accel: bmc150: use aligned scan buffer for both trigger and fifo Yash Suthar
2026-08-27  6:57   ` Andy Shevchenko
2026-08-25  8:51 ` [PATCH v3 2/3] iio: accel: bmc150: use DMA-safe buffers for regmap bulk reads Yash Suthar
2026-08-27  7:05   ` Andy Shevchenko
2026-08-25  8:51 ` Yash Suthar [this message]
2026-08-27  7:08   ` [PATCH v3 3/3] iio: accel: bmc150: use iio_push_to_buffers_with_ts() Andy Shevchenko
2026-08-27  6:52 ` [PATCH v3 0/3] iio: accel: bmc150: DMA-safe buffers and " Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260825085156.212042-4-yashsuthar983@gmail.com \
    --to=yashsuthar983@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=grondon@gmail.com \
    --cc=hexlabsecurity@proton.me \
    --cc=jic23@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox