From: Nuno Sá Date: Tue, 30 Sep 2025 15:33:17 +0000 (+0100) Subject: iio: position: hid-sensor-custom-intel-hinge: replace sprintf() with sysfs_emit() X-Git-Tag: v6.19-rc1~65^2~58^2~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd72a3880fc46fa383bff349033e96debcd401bf;p=thirdparty%2Fkernel%2Flinux.git iio: position: hid-sensor-custom-intel-hinge: replace sprintf() with sysfs_emit() Update the hinge_read_label() function to use sysfs_emit() for generating labels. Signed-off-by: Nuno Sá Acked-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/position/hid-sensor-custom-intel-hinge.c b/drivers/iio/position/hid-sensor-custom-intel-hinge.c index bff7039690ac3..a26d391661fdb 100644 --- a/drivers/iio/position/hid-sensor-custom-intel-hinge.c +++ b/drivers/iio/position/hid-sensor-custom-intel-hinge.c @@ -176,7 +176,7 @@ static int hinge_read_label(struct iio_dev *indio_dev, { struct hinge_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 const struct iio_info hinge_info = {