Commit 47a08c85 authored by Luis G.F's avatar Luis G.F Committed by Rafael J. Wysocki

ACPI / battery: Fix incorrect sscanf() string in acpi_battery_init_alarm()

Fix incorrect sscanf() string in acpi_battery_init_alarm().
Change from %ld to %lu, because 'x' is unsigned long.
Signed-off-by: default avatarLuis G.F <luisgf@luisgf.es>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 085ca117
...@@ -549,7 +549,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev, ...@@ -549,7 +549,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
{ {
unsigned long x; unsigned long x;
struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
if (sscanf(buf, "%ld\n", &x) == 1) if (sscanf(buf, "%lu\n", &x) == 1)
battery->alarm = x/1000; battery->alarm = x/1000;
if (acpi_battery_present(battery)) if (acpi_battery_present(battery))
acpi_battery_set_alarm(battery); acpi_battery_set_alarm(battery);
......
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