From: Nuno Sá Date: Tue, 30 Sep 2025 15:33:14 +0000 (+0100) Subject: iio: adc: mt6360-adc: replace snprintf() with sysfs_emit() X-Git-Tag: v6.19-rc1~65^2~58^2~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31ab988b9f2f6c4ef0b3782bebc8c662bb0ce257;p=thirdparty%2Fkernel%2Flinux.git iio: adc: mt6360-adc: replace snprintf() with sysfs_emit() Update the mt6360_adc_read_label() function to use sysfs_emit() for generating labels. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/mt6360-adc.c b/drivers/iio/adc/mt6360-adc.c index 69b3569c90e5b..e0e4df4186124 100644 --- a/drivers/iio/adc/mt6360-adc.c +++ b/drivers/iio/adc/mt6360-adc.c @@ -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 = {