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

iio: adc: ad4030: replace sprintf() with sysfs_emit()

Update the ad4030_read_label() function to use sysfs_emit() for generating
labels.

Signed-off-by: Nuno Sá <nuno.sal@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sá and committed by
Jonathan Cameron
ed1a8240 67f31f0b

+2 -2
+2 -2
drivers/iio/adc/ad4030.c
··· 852 852 char *label) 853 853 { 854 854 if (chan->differential) 855 - return sprintf(label, "differential%lu\n", chan->address); 856 - return sprintf(label, "common-mode%lu\n", chan->address); 855 + return sysfs_emit(label, "differential%lu\n", chan->address); 856 + return sysfs_emit(label, "common-mode%lu\n", chan->address); 857 857 } 858 858 859 859 static int ad4030_get_current_scan_type(const struct iio_dev *indio_dev,