diff options
| author | Gabriel Rondon <grondon@gmail.com> | 2026-08-18 22:51:22 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-08-31 00:52:15 +0100 |
| commit | 70d734e95d20f071b5f736b2d831e4141b37e40f (patch) | |
| tree | c1e54b788c7d3f55b112b77be12f463160d95825 /drivers/iio/accel | |
| parent | 8c5f649119f442a2f9bb5be629323ee62b3690df (diff) | |
| download | linux-next-70d734e95d20f071b5f736b2d831e4141b37e40f.tar.gz linux-next-70d734e95d20f071b5f736b2d831e4141b37e40f.zip | |
iio: accel: kionix-kx022a: use iio_push_to_buffers_with_ts()
Replace the deprecated iio_push_to_buffers_with_timestamp() with
iio_push_to_buffers_with_ts(), which takes the destination buffer size
and checks it against scan_bytes at runtime.
Signed-off-by: Gabriel Rondon <grondon@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'drivers/iio/accel')
| -rw-r--r-- | drivers/iio/accel/kionix-kx022a.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c index b7e5f150574e..8f2810c8ffeb 100644 --- a/drivers/iio/accel/kionix-kx022a.c +++ b/drivers/iio/accel/kionix-kx022a.c @@ -864,7 +864,8 @@ static int __kx022a_fifo_flush(struct iio_dev *idev, unsigned int samples, for_each_set_bit(bit, idev->active_scan_mask, AXIS_MAX) chs[bit] = sam[bit]; - iio_push_to_buffers_with_timestamp(idev, &data->scan, tstamp); + iio_push_to_buffers_with_ts(idev, &data->scan, + sizeof(data->scan), tstamp); tstamp += sample_period; } @@ -1034,7 +1035,8 @@ static irqreturn_t kx022a_trigger_handler(int irq, void *p) if (ret < 0) goto err_read; - iio_push_to_buffers_with_timestamp(idev, &data->scan, data->timestamp); + iio_push_to_buffers_with_ts(idev, &data->scan, sizeof(data->scan), + data->timestamp); err_read: iio_trigger_notify_done(idev->trig); |
