mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
4367d24b15
commit
fdc9719a63
@@ -769,7 +769,7 @@ static int rradc_read_raw(struct iio_dev *indio_dev,
|
||||
static int rradc_read_label(struct iio_dev *indio_dev,
|
||||
struct iio_chan_spec const *chan, char *label)
|
||||
{
|
||||
return snprintf(label, PAGE_SIZE, "%s\n",
|
||||
return sysfs_emit(label, "%s\n",
|
||||
rradc_chans[chan->address].label);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user