projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
085ca11
)
ACPI / battery: Fix incorrect sscanf() string in acpi_battery_init_alarm()
author
Luis G.F
<luisgf@luisgf.es>
Tue, 21 Jan 2014 14:40:43 +0000
(15:40 +0100)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Wed, 5 Feb 2014 00:07:54 +0000
(
01:07
+0100)
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>
drivers/acpi/battery.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/acpi/battery.c
b/drivers/acpi/battery.c
index 470e7542bf31a3c2d571385e9b418de0a28eb140..018a4288370630cb40203ecd43cc2809851288ae 100644
(file)
--- 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, "%l
d
\n", &x) == 1)
+ if (sscanf(buf, "%l
u
\n", &x) == 1)
battery->alarm = x/1000;
if (acpi_battery_present(battery))
acpi_battery_set_alarm(battery);