mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin Tůma" <tumic@gpxsee.org>
To: jic23@kernel.org, mchehab@kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 2/2] media: pci: mg4b: use iio_push_to_buffers_with_ts()
Date: Mon, 8 Sep 2025 18:38:04 +0200	[thread overview]
Message-ID: <f4256d82-e13a-4a67-9e72-7e9454f4e879@gpxsee.org> (raw)
In-Reply-To: <f65be4fc-0ed2-4b7e-9955-7f64200a51bf@gpxsee.org>


On 9/5/25 9:06 PM, David Lechner wrote:
> Replace iio_push_to_buffers_with_timestamp() with
> iio_push_to_buffers_with_ts(). This adds an extra argument with the
> buffer size to ensure that we aren't writing past the end of the buffer.
> No functional change.
> 
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Closes: https://lore.kernel.org/linux-iio/20250724115610.011110fb@jic23-huawei/
> Signed-off-by: David Lechner <dlechner@baylibre.com>

Reviewed-by: Martin Tůma <martin.tuma@digiteqautomotive.com>

> ---
>   drivers/media/pci/mgb4/mgb4_trigger.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/pci/mgb4/mgb4_trigger.c b/drivers/media/pci/mgb4/mgb4_trigger.c
> index bed8bbd4bc595d1d131b9919c6f3b705e43ba3c4..4f9a35904b4186618a554e3047d6b46ff7ed74be 100644
> --- a/drivers/media/pci/mgb4/mgb4_trigger.c
> +++ b/drivers/media/pci/mgb4/mgb4_trigger.c
> @@ -97,7 +97,7 @@ static irqreturn_t trigger_handler(int irq, void *p)
>   	scan.data = mgb4_read_reg(&st->mgbdev->video, 0xA0);
>   	mgb4_write_reg(&st->mgbdev->video, 0xA0, scan.data);
>   
> -	iio_push_to_buffers_with_timestamp(indio_dev, &scan, pf->timestamp);
> +	iio_push_to_buffers_with_ts(indio_dev, &scan, sizeof(scan), pf->timestamp);
>   	iio_trigger_notify_done(indio_dev->trig);
>   
>   	mgb4_write_reg(&st->mgbdev->video, 0xB4, 1U << 11);
> 


       reply	other threads:[~2025-09-08 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f65be4fc-0ed2-4b7e-9955-7f64200a51bf@gpxsee.org>
2025-09-08 16:38 ` Martin Tůma [this message]
2025-09-05 19:06 [PATCH 0/2] media: pci: mfb4: iio trigger improvements David Lechner
2025-09-05 19:06 ` [PATCH 2/2] media: pci: mg4b: use iio_push_to_buffers_with_ts() David Lechner
2025-09-07  9:32   ` Jonathan Cameron

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=f4256d82-e13a-4a67-9e72-7e9454f4e879@gpxsee.org \
    --to=tumic@gpxsee.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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

all inboxes | Powered by JetHome®