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

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á <nuno.sa@analog.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Nuno Sá and committed by
Jonathan Cameron
dd72a388 fdc9719a

+1 -1
+1 -1
drivers/iio/position/hid-sensor-custom-intel-hinge.c
··· 176 176 { 177 177 struct hinge_state *st = iio_priv(indio_dev); 178 178 179 - return sprintf(label, "%s\n", st->labels[chan->channel]); 179 + return sysfs_emit(label, "%s\n", st->labels[chan->channel]); 180 180 } 181 181 182 182 static const struct iio_info hinge_info = {