]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: iio: ad5933: use sysfs_emit() in show functions
authorGabriel Rondon <grondon@gmail.com>
Fri, 20 Mar 2026 22:24:23 +0000 (22:24 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2026 13:10:14 +0000 (13:10 +0000)
commitf6192780807d5c2fc08f506948b19c6072e1bfe8
treee6fc48387a9bf6d6500c9e1cc0e7beaaef4b7171
parent773a5dc613ed1c9b8b2a9d614d42ac994e99aeb6
staging: iio: ad5933: use sysfs_emit() in show functions

Replace sprintf() with sysfs_emit() in all sysfs attribute show
functions. sysfs_emit() is the preferred API for sysfs callbacks as
it is aware of the PAGE_SIZE buffer limit.

Also remove the unnecessary (int) cast in ad5933_show_frequency()
and use the correct format specifier %llu for the unsigned long long
freqreg variable.

Signed-off-by: Gabriel Rondon <grondon@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/impedance-analyzer/ad5933.c