]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: iio: ad7816: Replace sprintf() with sysfs_emit()
authorBruno Martins <ehanoc@protonmail.com>
Sun, 1 Mar 2026 21:28:26 +0000 (21:28 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 2 Mar 2026 21:01:23 +0000 (21:01 +0000)
commitcd04646c0f3eefdde87538f6ff932420cedc9ba0
treecb58796992edbdc68b0fae6489a7f93eb87684bf
parent5c3cf14b82f723ecaef7495fffcfe947e1c4d11e
staging: iio: ad7816: Replace sprintf() with sysfs_emit()

As stated in Documentation/filesystems/sysfs.rst:
'New implementations of show() methods should only use sysfs_emit() or
sysfs_emit_at() when formatting the value to be returned to user space.'

Replace sprintf with sysfs_emit in the following sysfs show functions:
- ad7816_show_mode()
- ad7816_show_available_modes()
- ad7816_show_channel()
- ad7816_show_value()
- ad7816_show_oti()

Signed-off-by: Bruno Martins <ehanoc@protonmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/adc/ad7816.c