diff options
| author | Beatriz Viana Costa <beatrizvianacosta16@gmail.com> | 2025-04-23 21:21:44 -0300 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-05-21 14:20:28 +0100 |
| commit | 50ed17cdfd7f32f1b0f87da0aaabcd5e8dd23f19 (patch) | |
| tree | 92c94a0a06d480ad5842bb0a1c2c29e8db410070 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 52c43d80fa8370eb877fc63b1fc1eec67e1b1410 (diff) | |
iio: light: zopt2201: Remove code duplication in scale write functions
Consolidate duplicated logic from zopt2201_write_scale_als_by_idx() and
zopt2201_write_scale_uvb_by_idx() into a new generic helper function
zopt2201_write_scale_by_idx(). This function takes an additional
parameter: a pointer to a zopt2201_scale array.
To support this, the previously anonymous and duplicated struct used in
the scale arrays was promoted to a named struct: zopt2201_scale.
This change also corrects an incorrect array access that existed in
zopt2201_write_scale_uvb_by_idx().
Signed-off-by: Beatriz Viana Costa <beatrizvianacosta16@gmail.com>
Co-developed-by: Gabriela Victor <gabevictor333@gmail.com>
Signed-off-by: Gabriela Victor <gabevictor333@gmail.com>
Link: https://patch.msgid.link/20250424002144.23260-1-beatrizvianacosta16@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
