Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
255f0385
Commit
255f0385
authored
Feb 16, 2007
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull bugzilla-7897 into release branch
parents
902b236c
e6d0f562
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
drivers/acpi/sbs.c
drivers/acpi/sbs.c
+9
-11
No files found.
drivers/acpi/sbs.c
View file @
255f0385
...
...
@@ -1033,21 +1033,19 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
}
else
{
seq_printf
(
seq
,
"capacity state: ok
\n
"
);
}
foo
=
(
s16
)
battery
->
state
.
amperage
*
battery
->
info
.
ipscale
;
if
(
battery
->
info
.
capacity_mode
)
{
foo
=
foo
*
battery
->
info
.
design_voltage
/
1000
;
}
if
(
battery
->
state
.
amperage
<
0
)
{
seq_printf
(
seq
,
"charging state: discharging
\n
"
);
foo
=
battery
->
state
.
remaining_capacity
*
cscale
*
60
/
(
battery
->
state
.
average_time_to_empty
==
0
?
1
:
battery
->
state
.
average_time_to_empty
);
seq_printf
(
seq
,
"present rate: %i%s
\n
"
,
foo
,
battery
->
info
.
capacity_mode
?
"0 mW"
:
" mA"
);
seq_printf
(
seq
,
"present rate: %d %s
\n
"
,
-
foo
,
battery
->
info
.
capacity_mode
?
"mW"
:
"mA"
);
}
else
if
(
battery
->
state
.
amperage
>
0
)
{
seq_printf
(
seq
,
"charging state: charging
\n
"
);
foo
=
(
battery
->
info
.
full_charge_capacity
-
battery
->
state
.
remaining_capacity
)
*
cscale
*
60
/
(
battery
->
state
.
average_time_to_full
==
0
?
1
:
battery
->
state
.
average_time_to_full
);
seq_printf
(
seq
,
"present rate: %i%s
\n
"
,
foo
,
battery
->
info
.
capacity_mode
?
"0 mW"
:
" mA"
);
seq_printf
(
seq
,
"present rate: %d %s
\n
"
,
foo
,
battery
->
info
.
capacity_mode
?
"mW"
:
"mA"
);
}
else
{
seq_printf
(
seq
,
"charging state: charged
\n
"
);
seq_printf
(
seq
,
"present rate: 0 %s
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment