iio: adc: qcom-spmi-rradc: replace snprintf() with sysfs_emit()

Update the rradc_read_label() function to use sysfs_emit() for generating
labels.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
pull/1354/merge
Nuno Sá 2025-09-30 16:33:16 +01:00 committed by Jonathan Cameron
parent 4367d24b15
commit fdc9719a63
1 changed files with 1 additions and 1 deletions

View File

@ -769,7 +769,7 @@ static int rradc_read_raw(struct iio_dev *indio_dev,
static int rradc_read_label(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, char *label)
{
return snprintf(label, PAGE_SIZE, "%s\n",
return sysfs_emit(label, "%s\n",
rradc_chans[chan->address].label);
}