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

index 69b3569c90e5b665e1d2c59621df00d6142fbe9c..e0e4df418612469bb11a88bdbeb77aeb7cb833eb 100644 (file)
@@ -216,7 +216,7 @@ static const char *mt6360_channel_labels[MT6360_CHAN_MAX] = {
 static int mt6360_adc_read_label(struct iio_dev *iio_dev, const struct iio_chan_spec *chan,
                                 char *label)
 {
-       return snprintf(label, PAGE_SIZE, "%s\n", mt6360_channel_labels[chan->channel]);
+       return sysfs_emit(label, "%s\n", mt6360_channel_labels[chan->channel]);
 }
 
 static const struct iio_info mt6360_adc_iio_info = {