diff options
author | Luis G.F <luisgf@luisgf.es> | 2014-01-21 09:40:43 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-04 19:07:54 -0500 |
commit | 47a08c85f70ebdbaaf42b444af57dd6f83e04485 (patch) | |
tree | e5b9f82d3b7d488ae0dbfcc32178308d72e1fd1b /drivers/acpi/battery.c | |
parent | 085ca1175cdccc8e400f6d06cf64e209b46021a2 (diff) |
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: Luis G.F <luisgf@luisgf.es>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r-- | drivers/acpi/battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 470e7542bf31..018a42883706 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -549,7 +549,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev, | |||
549 | { | 549 | { |
550 | unsigned long x; | 550 | unsigned long x; |
551 | struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); | 551 | struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); |
552 | if (sscanf(buf, "%ld\n", &x) == 1) | 552 | if (sscanf(buf, "%lu\n", &x) == 1) |
553 | battery->alarm = x/1000; | 553 | battery->alarm = x/1000; |
554 | if (acpi_battery_present(battery)) | 554 | if (acpi_battery_present(battery)) |
555 | acpi_battery_set_alarm(battery); | 555 | acpi_battery_set_alarm(battery); |