diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2020-11-14 12:59:59 +0100 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-12-03 19:32:43 +0000 |
| commit | eda20ba1e25e6d8e7fa0c62d1bd685aa5de8e8ff (patch) | |
| tree | e590dfb932cea6afbf3497b738ab4981daf1de2a /tools/perf/scripts/python | |
| parent | dt-bindings:iio:samsung, exynos-adc: drop missuse of io-channel-ranges (diff) | |
| download | linux-eda20ba1e25e6d8e7fa0c62d1bd685aa5de8e8ff.tar.gz linux-eda20ba1e25e6d8e7fa0c62d1bd685aa5de8e8ff.zip | |
iio: core: Consolidate iio_format_avail_{list,range}()
The iio_format_avail_list() and iio_format_avail_range() functions are
almost identical. The only differences are that iio_format_avail_range()
expects a fixed amount of items and adds brackets "[ ]" around the output.
Refactor them into a common helper function. This improves the
maintainability of the code as it makes it easier to modify the
implementation of these functions.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20201114120000.6533-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
