]> git.baikalelectronics.ru Git - kernel.git/commit
iio: __iio_format_value(): Convert to sysfs_emit_at()
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 20 Mar 2021 07:14:04 +0000 (08:14 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Mar 2021 10:12:30 +0000 (11:12 +0100)
commit810a9153df9c9a7cab1cfbb68319b8d25eb968f8
tree1bed37c96178b84d24672af703e219dec3fb1cc3
parent9a091ddd36848d5c11c44c07df55a26f2114879d
iio: __iio_format_value(): Convert to sysfs_emit_at()

sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it
knows about the sysfs buffer specifics and has some built-in sanity checks.

Convert __iio_format_value() and related functions to use this new
interface.

This conversion involves changing the signature of __iio_format_value() so
that it similar to sysfs_emit_at() and takes the buffers start address and
an offset where to write within the buffer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20210320071405.9347-4-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c