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

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

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

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Marius Cristea <marius.cristea@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sá and committed by
Jonathan Cameron
08be56eb 69911a64

+1 -1
+1 -1
drivers/iio/adc/mcp3564.c
··· 987 987 { 988 988 struct mcp3564_state *adc = iio_priv(indio_dev); 989 989 990 - return sprintf(label, "%s\n", adc->labels[chan->scan_index]); 990 + return sysfs_emit(label, "%s\n", adc->labels[chan->scan_index]); 991 991 } 992 992 993 993 static int mcp3564_parse_fw_children(struct iio_dev *indio_dev)