iio: adc: ad4030: replace sprintf() with sysfs_emit()

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

Signed-off-by: Nuno Sá <nuno.sal@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Nuno Sá
2025-09-30 16:33:10 +01:00
committed by Jonathan Cameron
parent 67f31f0b5f
commit ed1a82401b

View File

@@ -852,8 +852,8 @@ static int ad4030_read_label(struct iio_dev *indio_dev,
char *label)
{
if (chan->differential)
return sprintf(label, "differential%lu\n", chan->address);
return sprintf(label, "common-mode%lu\n", chan->address);
return sysfs_emit(label, "differential%lu\n", chan->address);
return sysfs_emit(label, "common-mode%lu\n", chan->address);
}
static int ad4030_get_current_scan_type(const struct iio_dev *indio_dev,