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>pull/1354/merge
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);
|
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 = {
|
static const struct iio_info hinge_info = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue