Commit 0b5f91d4 authored by Nuno Sa's avatar Nuno Sa Committed by Guenter Roeck

hwmon: (axi-fan-control) Make use of sysfs_emit()

Use sysfs_emit() instead of directly call sprintf().
Signed-off-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240214-axi-fan-control-no-of-v1-2-43ca656fe2e3@analog.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 1b5239f7
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment