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

iio: adc: qcom-spmi-rradc: replace snprintf() with sysfs_emit()

Update the rradc_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
fdc9719a 4367d24b

+1 -1
+1 -1
drivers/iio/adc/qcom-spmi-rradc.c
··· 769 769 static int rradc_read_label(struct iio_dev *indio_dev, 770 770 struct iio_chan_spec const *chan, char *label) 771 771 { 772 - return snprintf(label, PAGE_SIZE, "%s\n", 772 + return sysfs_emit(label, "%s\n", 773 773 rradc_chans[chan->address].label); 774 774 } 775 775