diff options
| author | Archit Anant <architanant5@gmail.com> | 2026-04-12 15:07:37 +0530 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-04-27 09:58:21 +0100 |
| commit | 21450969a7e86ee46dd6c546ae639057aa403b53 (patch) | |
| tree | e3e9de2d4c60f2ae2640a93555a1cf262b0e4ded /tools/perf/scripts/python/stackcollapse.py | |
| parent | fa2d96d2896093a01115491c8e672d5694b4e23a (diff) | |
iio: adc: ad799x: use a static buffer for scan data
Currently, rx_buf is dynamically allocated using kmalloc() every time
ad799x_update_scan_mode() is called. This can lead to memory leaks if
the scan mask is updated multiple times.
Drop the dynamic allocation and replace it with a static buffer at the
end of the state structure using IIO_DECLARE_BUFFER_WITH_TS().
This eliminates the allocation overhead, prevents leaks, and removes
the need for manual kfree() on driver removal.
Suggested-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Archit Anant <architanant5@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
