mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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>
This commit is contained in:
parent
8c5f649119
commit
70d734e95d
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user