projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae4bb15
)
apm_power: check I.intval for zero value, we use it as the divisor
author
Anton Vorontsov
<cbouatmailru@gmail.com>
Sat, 12 Jan 2008 23:44:54 +0000
(
02:44
+0300)
committer
Anton Vorontsov
<cbouatmailru@gmail.com>
Fri, 1 Feb 2008 23:44:34 +0000
(
02:44
+0300)
Signed-off-by: Anton Vorontsov <cbou@mail.ru>
drivers/power/apm_power.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/power/apm_power.c
b/drivers/power/apm_power.c
index a832a9a05c66e8f469340978c52ad4db36c2ce08..a4892275659dc02ffb1d12b85d0774a86bda8b08 100644
(file)
--- a/
drivers/power/apm_power.c
+++ b/
drivers/power/apm_power.c
@@
-133,6
+133,9
@@
static int do_calculate_time(int status, enum apm_source source)
return -1;
}
+ if (!I.intval)
+ return 0;
+
switch (source) {
case SOURCE_CHARGE:
full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;