Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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á <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sá and committed by
Jonathan Cameron
31ab988b f24a5ef7

+1 -1
+1 -1
drivers/iio/adc/mt6360-adc.c
··· 216 216 static int mt6360_adc_read_label(struct iio_dev *iio_dev, const struct iio_chan_spec *chan, 217 217 char *label) 218 218 { 219 - return snprintf(label, PAGE_SIZE, "%s\n", mt6360_channel_labels[chan->channel]); 219 + return sysfs_emit(label, "%s\n", mt6360_channel_labels[chan->channel]); 220 220 } 221 221 222 222 static const struct iio_info mt6360_adc_iio_info = {