Skip to content

Commit 0b5f91d

Browse files
nunojsagroeck
authored andcommitted
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>
1 parent 1b5239f commit 0b5f91d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/axi-fan-control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static ssize_t axi_fan_control_show(struct device *dev, struct device_attribute
8484

8585
temp = DIV_ROUND_CLOSEST_ULL(temp * 509314ULL, 65535) - 280230;
8686

87-
return sprintf(buf, "%u\n", temp);
87+
return sysfs_emit(buf, "%u\n", temp);
8888
}
8989

9090
static ssize_t axi_fan_control_store(struct device *dev, struct device_attribute *da,

0 commit comments

Comments
 (0)