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
Kirill Smelkov
linux
Commits
be60348a
Commit
be60348a
authored
May 05, 2022
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back earlier int340x thermal driver changes for 5.19.
parents
d0f6cfb2
ad47f834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
+9
-15
No files found.
drivers/thermal/intel/int340x_thermal/int3400_thermal.c
View file @
be60348a
...
...
@@ -169,28 +169,25 @@ static int int3400_thermal_run_osc(acpi_handle handle, char *uuid_str, int *enab
acpi_status
status
;
int
result
=
0
;
struct
acpi_osc_context
context
=
{
.
uuid_str
=
NULL
,
.
uuid_str
=
uuid_str
,
.
rev
=
1
,
.
cap
.
length
=
8
,
.
cap
.
pointer
=
buf
,
};
context
.
uuid_str
=
uuid_str
;
buf
[
OSC_QUERY_DWORD
]
=
0
;
buf
[
OSC_SUPPORT_DWORD
]
=
*
enable
;
context
.
cap
.
pointer
=
buf
;
status
=
acpi_run_osc
(
handle
,
&
context
);
if
(
ACPI_SUCCESS
(
status
))
{
ret
=
*
((
u32
*
)(
context
.
ret
.
pointer
+
4
));
if
(
ret
!=
*
enable
)
result
=
-
EPERM
;
kfree
(
context
.
ret
.
pointer
);
}
else
result
=
-
EPERM
;
kfree
(
context
.
ret
.
pointer
);
return
result
;
}
...
...
@@ -508,21 +505,18 @@ static void int3400_setup_gddv(struct int3400_thermal_priv *priv)
obj
=
buffer
.
pointer
;
if
(
obj
->
type
!=
ACPI_TYPE_PACKAGE
||
obj
->
package
.
count
!=
1
||
obj
->
package
.
elements
[
0
].
type
!=
ACPI_TYPE_BUFFER
)
{
kfree
(
buffer
.
pointer
);
return
;
}
||
obj
->
package
.
elements
[
0
].
type
!=
ACPI_TYPE_BUFFER
)
goto
out_free
;
priv
->
data_vault
=
kmemdup
(
obj
->
package
.
elements
[
0
].
buffer
.
pointer
,
obj
->
package
.
elements
[
0
].
buffer
.
length
,
GFP_KERNEL
);
if
(
!
priv
->
data_vault
)
{
kfree
(
buffer
.
pointer
);
return
;
}
if
(
!
priv
->
data_vault
)
goto
out_free
;
bin_attr_data_vault
.
private
=
priv
->
data_vault
;
bin_attr_data_vault
.
size
=
obj
->
package
.
elements
[
0
].
buffer
.
length
;
out_free:
kfree
(
buffer
.
pointer
);
}
...
...
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