iio: accel: adxl367: do not update FIFO watermark on scan mode update
Currently, the driver updates the FIFO watermark inside both update_scan_mode() and hwfifo_set_watermark(). Inside the IIO core, hwfifo_set_watermark() is called immediately after update_scan_mode(), making the first call to set_fifo_samples() redundant. Remove the first call to set_fifo_samples(), and merge the set_fifo_samples() function into the set_fifo_watermark() function. Also, since fifo_set_size is always set inside of update_scan_mode(), and it cannot be set to 0, remove the zero check from set_fifo_samples(). Signed-off-by:Cosmin Tanislav <cosmin.tanislav@analog.com> Link: https://lore.kernel.org/r/20220514182010.152784-1-cosmin.tanislav@analog.comSigned-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment