Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
6f5464ce
Commit
6f5464ce
authored
Dec 24, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'osc' into release
parents
2f99f5c8
9dc130fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
drivers/acpi/bus.c
drivers/acpi/bus.c
+18
-8
No files found.
drivers/acpi/bus.c
View file @
6f5464ce
...
@@ -397,6 +397,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
...
@@ -397,6 +397,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
union
acpi_object
*
out_obj
;
union
acpi_object
*
out_obj
;
u8
uuid
[
16
];
u8
uuid
[
16
];
u32
errors
;
u32
errors
;
struct
acpi_buffer
output
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
if
(
!
context
)
if
(
!
context
)
return
AE_ERROR
;
return
AE_ERROR
;
...
@@ -419,16 +420,16 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
...
@@ -419,16 +420,16 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
in_params
[
3
].
buffer
.
length
=
context
->
cap
.
length
;
in_params
[
3
].
buffer
.
length
=
context
->
cap
.
length
;
in_params
[
3
].
buffer
.
pointer
=
context
->
cap
.
pointer
;
in_params
[
3
].
buffer
.
pointer
=
context
->
cap
.
pointer
;
status
=
acpi_evaluate_object
(
handle
,
"_OSC"
,
&
input
,
&
context
->
re
t
);
status
=
acpi_evaluate_object
(
handle
,
"_OSC"
,
&
input
,
&
outpu
t
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
return
status
;
return
status
;
/* return buffer should have the same length as cap buffer */
if
(
!
output
.
length
)
if
(
context
->
ret
.
length
!=
context
->
cap
.
length
)
return
AE_NULL_OBJECT
;
return
AE_NULL_OBJECT
;
out_obj
=
context
->
ret
.
pointer
;
out_obj
=
output
.
pointer
;
if
(
out_obj
->
type
!=
ACPI_TYPE_BUFFER
)
{
if
(
out_obj
->
type
!=
ACPI_TYPE_BUFFER
||
out_obj
->
buffer
.
length
!=
context
->
cap
.
length
)
{
acpi_print_osc_error
(
handle
,
context
,
acpi_print_osc_error
(
handle
,
context
,
"_OSC evaluation returned wrong type"
);
"_OSC evaluation returned wrong type"
);
status
=
AE_TYPE
;
status
=
AE_TYPE
;
...
@@ -457,11 +458,20 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
...
@@ -457,11 +458,20 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
goto
out_kfree
;
goto
out_kfree
;
}
}
out_success:
out_success:
return
AE_OK
;
context
->
ret
.
length
=
out_obj
->
buffer
.
length
;
context
->
ret
.
pointer
=
kmalloc
(
context
->
ret
.
length
,
GFP_KERNEL
);
if
(
!
context
->
ret
.
pointer
)
{
status
=
AE_NO_MEMORY
;
goto
out_kfree
;
}
memcpy
(
context
->
ret
.
pointer
,
out_obj
->
buffer
.
pointer
,
context
->
ret
.
length
);
status
=
AE_OK
;
out_kfree:
out_kfree:
kfree
(
context
->
ret
.
pointer
);
kfree
(
output
.
pointer
);
context
->
ret
.
pointer
=
NULL
;
if
(
status
!=
AE_OK
)
context
->
ret
.
pointer
=
NULL
;
return
status
;
return
status
;
}
}
EXPORT_SYMBOL
(
acpi_run_osc
);
EXPORT_SYMBOL
(
acpi_run_osc
);
...
...
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