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
230bf224
Commit
230bf224
authored
Jul 13, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge intel.com:/home/lenb/src/linux-acpi-test-2.6.7
into intel.com:/home/lenb/src/linux-acpi-test-2.6.8
parents
36742fdd
caa26d76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+14
-5
No files found.
drivers/acpi/thermal.c
View file @
230bf224
...
...
@@ -899,8 +899,10 @@ acpi_thermal_write_trip_points (
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
m
->
private
;
char
limit_string
[
25
]
=
{
'\0'
};
int
critical
,
hot
,
passive
,
active0
,
active1
;
char
limit_string
[
65
]
=
{
'\0'
};
int
num
,
critical
,
hot
,
passive
;
int
active
[
ACPI_THERMAL_MAX_ACTIVE
];
int
i
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_thermal_write_trip_points"
);
...
...
@@ -916,7 +918,11 @@ acpi_thermal_write_trip_points (
limit_string
[
count
]
=
'\0'
;
if
(
sscanf
(
limit_string
,
"%d:%d:%d:%d:%d"
,
&
critical
,
&
hot
,
&
passive
,
&
active0
,
&
active1
)
!=
5
)
{
num
=
sscanf
(
limit_string
,
"%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d"
,
&
critical
,
&
hot
,
&
passive
,
&
active
[
0
],
&
active
[
1
],
&
active
[
2
],
&
active
[
3
],
&
active
[
4
],
&
active
[
5
],
&
active
[
6
],
&
active
[
7
],
&
active
[
8
],
&
active
[
9
]);
if
(
!
(
num
>=
5
&&
num
<
(
ACPI_THERMAL_MAX_ACTIVE
+
3
)))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Invalid data format
\n
"
));
return_VALUE
(
-
EINVAL
);
}
...
...
@@ -924,8 +930,11 @@ acpi_thermal_write_trip_points (
tz
->
trips
.
critical
.
temperature
=
CELSIUS_TO_KELVIN
(
critical
);
tz
->
trips
.
hot
.
temperature
=
CELSIUS_TO_KELVIN
(
hot
);
tz
->
trips
.
passive
.
temperature
=
CELSIUS_TO_KELVIN
(
passive
);
tz
->
trips
.
active
[
0
].
temperature
=
CELSIUS_TO_KELVIN
(
active0
);
tz
->
trips
.
active
[
1
].
temperature
=
CELSIUS_TO_KELVIN
(
active1
);
for
(
i
=
0
;
i
<
num
-
3
;
i
++
)
{
if
(
!
(
tz
->
trips
.
active
[
i
].
flags
.
valid
))
break
;
tz
->
trips
.
active
[
i
].
temperature
=
CELSIUS_TO_KELVIN
(
active
[
i
]);
}
return_VALUE
(
count
);
}
...
...
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