iio: adc: Convert to IIO_MAP()
Use IIO_MAP() instead of hand-writing it. It is much less verbose.
The change has been do with the following coccinelle script:
@@
identifier STRUCT_NAME;
constant NAME, CHANNEL, LABEL;
@@
static const struct iio_map STRUCT_NAME[] = {
...,
- {
- .consumer_dev_name = NAME,
- .consumer_channel = CHANNEL,
- .adc_channel_label = LABEL,
- },
+ IIO_MAP(LABEL, NAME, CHANNEL),
...
};
@@
identifier STRUCT_NAME;
constant NAME, LABEL;
@@
static const struct iio_map STRUCT_NAME[] = {
...,
- {
- .consumer_dev_name = NAME,
- .adc_channel_label = LABEL,
- },
+ IIO_MAP(LABEL, NAME, NULL),
...
};
--
Compile tested only
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/48f08224fab5a7595f650dbcef012d7cac3f972b.1725729801.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>