]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: max1363: Use a small fixed size buffer to replace dynamic allocation
authorVasileios Amoiridis <vassilisamir@gmail.com>
Sat, 14 Dec 2024 19:14:19 +0000 (20:14 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Dec 2024 14:28:13 +0000 (14:28 +0000)
commit45e3146d75424392e1cbc057e2b560785de82806
tree23c5e2a0aefe78d98326587d5c8efa8bbf9b9710
parent6fcabe62de98bdd7a20c2b46992e90caf8fdd28a
iio: adc: max1363: Use a small fixed size buffer to replace dynamic allocation

Drop the recurrent allocation of the data buffer from the trigger
handler and put it in the iio_priv(). This way, the maximum amount of
channels is always allocated in favor of simpler code and drop
of usage of the internal private variable "scan_timestamp" of the
struct iio_dev.

Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20241214191421.94172-3-vassilisamir@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max1363.c