Commit aa532663 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Rafael J. Wysocki

ACPI: battery: use sysfs_emit over sprintf

sysfs_emit validates assumptions made by sysfs and is the correct
mechanism to format data for sysfs.
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 3483053d
......@@ -661,7 +661,7 @@ static ssize_t acpi_battery_alarm_show(struct device *dev,
{
struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
return sprintf(buf, "%d\n", battery->alarm * 1000);
return sysfs_emit(buf, "%d\n", battery->alarm * 1000);
}
static ssize_t acpi_battery_alarm_store(struct device *dev,
......
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