mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
fdc9719a63
commit
dd72a3880f
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user