Skip to content

Commit

Permalink
ACPI / SBS: Fix incorrect sscanf() string
Browse files Browse the repository at this point in the history
Fix incorrect sscanf() string in function acpi_battery_alarm_store().

Signed-off-by: Luis G.F <luisgf@luisgf.es>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Luis G.F authored and Rafael J. Wysocki committed Feb 13, 2014
1 parent b28a960 commit 32a9051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/sbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
{
unsigned long x;
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_capacity = x /
(1000 * acpi_battery_scale(battery));
if (battery->present)
Expand Down

0 comments on commit 32a9051

Please sign in to comment.