diff options
author | Marijn Suijten <marijn.suijten@somainline.org> | 2023-05-02 01:17:35 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-05-13 18:28:10 +0100 |
commit | 0744ef3b2b63e705aee9cc26bbbf290480335880 (patch) | |
tree | 5a57a767ef0dd67e287094931f339fc4eecb0b4b | |
parent | e93cde03abf72fd7c98c08107dbeb3b9dfe9dca5 (diff) | |
download | linux-stable-0744ef3b2b63e705aee9cc26bbbf290480335880.tar.gz linux-stable-0744ef3b2b63e705aee9cc26bbbf290480335880.tar.bz2 linux-stable-0744ef3b2b63e705aee9cc26bbbf290480335880.zip |
iio: adc: qcom-spmi-adc5: Fall back to datasheet_name instead of fwnode name
Since the migration to fwnode_get_name in commit 4f47a236a23d ("iio:
adc: qcom-spmi-adc5: convert to device properties") the resulting
adc5_channel_prop::channel_name (renamed from datasheet_name in the
previous patch) - which is propagated into iio_chan_spec::extend_name -
was containing the DT node name including @xx suffix if a "label"
property is not present, while adc5_channels::datasheet_name was thus
far set by the macros but always remained unread. Put it to use instead
of using a confusing name containing @xx in sysfs filenames (again, when
"label" is not set).
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230502-iio-adc-propagate-fw-node-label-v3-3-6be5db6e6b5a@somainline.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/adc/qcom-spmi-adc5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index 6e4e5cb5cbbb..fe2000209d97 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -669,7 +669,7 @@ static int adc5_get_fw_channel_data(struct adc5_chip *adc, ret = fwnode_property_read_string(fwnode, "label", &channel_name); if (ret) - channel_name = name; + channel_name = data->adc_chans[chan].datasheet_name; prop->channel_name = channel_name; |