iio: scd4x: Use sysfs_emit()
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 16 Dec 2021 18:52:16 +0000 (19:52 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 23 Jan 2022 18:03:36 +0000 (18:03 +0000)
commit1acdaa34ad17e304d39d83fc9affc2d71c550a13
treed779b5bd46b44af4c3d820ea43de8e2c4092f5c4
parent6ab56c467593b422079cf119beb4e7c44f5417a9
iio: scd4x: Use sysfs_emit()

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

Use sysfs_emit() to format the custom `calibration_auto_enable` device
attribute of the scd4x driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20211216185217.1054495-13-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/scd4x.c