summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLuis G.F <luisgf@luisgf.es>2014-01-21 15:40:43 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-05 01:07:54 +0100
commit47a08c85f70ebdbaaf42b444af57dd6f83e04485 (patch)
treee5b9f82d3b7d488ae0dbfcc32178308d72e1fd1b /drivers
parentACPI / proc: remove unneeded NULL check (diff)
downloadlinux-47a08c85f70ebdbaaf42b444af57dd6f83e04485.tar.xz
linux-47a08c85f70ebdbaaf42b444af57dd6f83e04485.zip
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')
-rw-r--r--drivers/acpi/battery.c2
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,
{
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 = x/1000;
if (acpi_battery_present(battery))
acpi_battery_set_alarm(battery);