iio: core: Use sysfs_emit() (trivial bits)
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 20 Mar 2021 07:14:02 +0000 (08:14 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Mar 2021 10:12:30 +0000 (11:12 +0100)
commit83ca56b663cf3116c4a5535b4eb6eccb82113828
tree7d3bea9dec67d0cf0b4e08a9446507ef736d1a06
parent7b2d92a3c8e5e8a7ef2710a928a1011bcebc2b91
iio: core: Use sysfs_emit() (trivial bits)

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.

This patch converts the places in the iio core that follow the pattern of

   return s*printf(...)

to

   return sysfs_emit(...)

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