Lars-Peter Clausen
eda20ba1e2
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>
2020-12-03 19:32:43 +00:00
..
2020-11-22 11:52:10 -08:00
2020-11-19 14:03:52 +01:00
2020-10-17 15:05:30 -06:00
2020-10-30 14:51:01 -07:00
2020-11-18 16:42:07 -08:00
2020-11-02 18:14:07 +01:00
2020-10-01 16:23:50 +03:00
2020-11-12 13:59:04 -07:00
2020-10-30 16:57:41 -05:00
2020-10-24 10:39:22 -07:00
2020-11-15 10:15:17 -08:00
2020-11-04 17:13:12 -08:00
2020-10-25 14:51:49 -07:00
2020-11-01 17:17:31 +00:00
2020-11-17 13:25:06 +01:00
2020-11-16 13:24:32 +01:00
2020-10-28 11:41:15 -06:00
2020-11-22 10:48:22 -08:00
2020-09-29 17:50:10 +09:00
2020-11-20 10:23:49 -08:00
2020-10-15 14:43:29 -07:00
2020-10-12 13:26:49 -07:00
2020-09-30 00:40:06 +09:00
2020-11-09 18:35:35 +01:00
2020-11-11 09:53:09 +01:00
2020-11-20 11:21:54 +10:00
2020-11-22 14:36:06 -08:00
2020-11-16 15:02:33 -08:00
2020-11-13 06:46:20 -08:00
2020-10-29 20:10:25 +01:00
2020-11-06 16:02:00 +01:00
2020-10-17 11:01:01 -07:00
2020-10-13 12:12:44 -07:00
2020-10-27 19:03:53 +01:00
2020-12-03 19:32:43 +00:00
2020-11-13 12:25:21 -04:00
2020-11-17 12:00:40 -08:00
2020-10-27 16:01:22 +02:00
2020-11-20 10:20:16 -08:00
2020-11-08 09:52:57 -08:00
2020-10-07 12:02:58 +02:00
2020-10-16 09:28:45 -06:00
2020-10-16 12:21:15 -07:00
2020-10-24 10:39:22 -07:00
2020-10-14 15:05:38 -07:00
2020-10-15 14:43:29 -07:00
2020-10-24 10:39:22 -07:00
2020-09-28 12:17:36 +02:00
2020-10-26 16:57:18 -04:00
2020-10-14 15:56:58 -07:00
2020-11-04 08:56:07 +02:00
2020-11-17 12:44:44 +01:00
2020-10-30 18:24:51 +01:00
2020-11-23 08:21:37 +01:00
2020-10-20 10:36:41 -07:00
2020-10-25 11:12:31 -07:00
2020-10-13 18:38:28 -07:00
2020-11-14 09:57:55 +01:00
2020-09-27 14:25:48 +02:00
2020-11-11 17:10:16 -06:00
2020-10-27 13:21:03 +05:30
2020-10-06 07:07:03 +02:00
2020-11-04 13:55:30 -06:00
2020-10-01 22:30:07 +01:00
2020-10-22 12:41:00 -07:00
2020-11-10 15:35:41 +01:00
2020-10-23 16:16:31 -07:00
2020-10-27 19:23:04 +01:00
2020-10-24 10:33:08 -07:00
2020-11-10 10:02:31 -08:00
2020-10-24 10:33:08 -07:00
2020-10-16 11:11:22 -07:00
2020-11-18 17:59:24 +00:00
2020-10-22 12:56:33 -07:00
2020-10-24 10:39:22 -07:00
2020-10-22 12:58:21 -07:00
2020-10-21 11:22:08 -07:00
2020-11-20 12:03:40 -08:00
2020-11-20 16:24:28 -08:00
2020-10-29 22:13:38 +01:00
2020-10-01 22:59:55 +02:00
2020-11-17 17:08:39 +00:00
2020-11-23 18:02:09 +01:00
2020-11-20 16:24:28 -08:00
2020-11-13 13:44:05 +01:00
2020-11-12 12:30:29 +01:00
2020-11-06 16:39:11 +03:00
2020-11-12 09:41:07 +01:00
2020-11-09 18:54:30 +01:00
2020-11-13 15:26:49 +01:00
2020-11-16 14:58:23 -08:00
2020-11-03 11:07:40 -07:00
2020-11-15 17:30:55 -05:00
2020-11-09 08:17:46 +01:00
2020-11-09 18:20:36 +01:00
2020-10-23 11:00:57 -07:00
2020-10-05 14:49:24 +02:00
2020-10-24 10:33:08 -07:00
2020-11-02 10:10:39 -05:00