]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ad7768-1: replace sprintf() with sysfs_emit()
authorNuno Sá <nuno.sa@analog.com>
Tue, 30 Sep 2025 15:33:11 +0000 (16:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Oct 2025 10:59:17 +0000 (11:59 +0100)
Update the ad7768_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>
drivers/iio/adc/ad7768-1.c

index 872c88d0c86cab9f083e38dbc65463676c62001f..d96802b7847a6320c12fd121b0999256f3bd04a8 100644 (file)
@@ -899,7 +899,7 @@ static int ad7768_read_label(struct iio_dev *indio_dev,
 {
        struct ad7768_state *st = iio_priv(indio_dev);
 
-       return sprintf(label, "%s\n", st->labels[chan->channel]);
+       return sysfs_emit(label, "%s\n", st->labels[chan->channel]);
 }
 
 static int ad7768_get_current_scan_type(const struct iio_dev *indio_dev,