From: Nuno Sá Date: Tue, 30 Sep 2025 15:33:11 +0000 (+0100) Subject: iio: adc: ad7768-1: replace sprintf() with sysfs_emit() X-Git-Tag: v6.19-rc1~65^2~58^2~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69911a64ba24c1077a38f3083202f93248e1c970;p=thirdparty%2Fkernel%2Flinux.git iio: adc: ad7768-1: replace sprintf() with sysfs_emit() Update the ad7768_read_label() function to use sysfs_emit(() for generating labels. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c index 872c88d0c86ca..d96802b7847a6 100644 --- a/drivers/iio/adc/ad7768-1.c +++ b/drivers/iio/adc/ad7768-1.c @@ -899,7 +899,7 @@ static int ad7768_read_label(struct iio_dev *indio_dev, { struct ad7768_state *st = iio_priv(indio_dev); - return sprintf(label, "%s\n", st->labels[chan->channel]); + return sysfs_emit(label, "%s\n", st->labels[chan->channel]); } static int ad7768_get_current_scan_type(const struct iio_dev *indio_dev,