From: Atharv Dubey <atharvd440@gmail.com>
To: jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
marcelo.schmitt@analog.com, mazziesaccount@gmail.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Atharv Dubey <atharvd440@gmail.com>
Subject: [PATCH 11/11] iio: adc : ad7944 : replace deprecated iio_push_to_buffers_with_timestamp()
Date: Mon, 16 Mar 2026 23:01:21 +0530 [thread overview]
Message-ID: <20260316173121.12210-1-atharvd440@gmail.com> (raw)
iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/iio/adc/ad7944.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/ad7944.c b/drivers/iio/adc/ad7944.c
index 7722cf9e8214..479ab882edc9 100644
--- a/drivers/iio/adc/ad7944.c
+++ b/drivers/iio/adc/ad7944.c
@@ -532,11 +532,13 @@ static irqreturn_t ad7944_trigger_handler(int irq, void *p)
goto out;
if (adc->spi_mode == AD7944_SPI_MODE_CHAIN)
- iio_push_to_buffers_with_timestamp(indio_dev, adc->chain_mode_buf,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, adc->chain_mode_buf,
+ sizeof(adc->chain_mode_buf),
+ pf->timestamp);
else
- iio_push_to_buffers_with_timestamp(indio_dev, &adc->sample.raw,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, &adc->sample.raw,
+ sizeof(adc->sample.raw),
+ pf->timestamp);
out:
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0
reply other threads:[~2026-03-16 17:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260316173121.12210-1-atharvd440@gmail.com \
--to=atharvd440@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.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