summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-02-14 17:36:44 +0300
committerGuenter Roeck <linux@roeck-us.net>2024-02-25 23:37:46 +0300
commit0b5f91d47d72d706360777fe03e40eab2f51a94a (patch)
tree01dc7a49c94b8b3116e8c05e140feaa174fffa8e /drivers/hwmon
parent1b5239f70fcd2d7fe86f0f5473006c2896db07a8 (diff)
downloadlinux-0b5f91d47d72d706360777fe03e40eab2f51a94a.tar.xz
hwmon: (axi-fan-control) Make use of sysfs_emit()
Use sysfs_emit() instead of directly call sprintf(). Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240214-axi-fan-control-no-of-v1-2-43ca656fe2e3@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/axi-fan-control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/axi-fan-control.c b/drivers/hwmon/axi-fan-control.c
index 8dfe3b6c5a17..efd42a4f5951 100644
--- a/drivers/hwmon/axi-fan-control.c
+++ b/drivers/hwmon/axi-fan-control.c
@@ -84,7 +84,7 @@ static ssize_t axi_fan_control_show(struct device *dev, struct device_attribute
temp = DIV_ROUND_CLOSEST_ULL(temp * 509314ULL, 65535) - 280230;
- return sprintf(buf, "%u\n", temp);
+ return sysfs_emit(buf, "%u\n", temp);
}
static ssize_t axi_fan_control_store(struct device *dev, struct device_attribute *da,