mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
eeepc-laptop: convert acpi_evaluate_object() to acpi_execute_simple_method()
acpi_execute_simple_method() is a new ACPI API introduced to invoke an ACPI control method that has single integer parameter and no return value. Convert acpi_evaluate_object() to acpi_execute_simple_method() in drivers/platform/x86/eeepc-laptop.c Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> CC: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
5e8ac96f29
commit
fca4199129
1 changed files with 1 additions and 7 deletions
|
@ -190,16 +190,10 @@ struct eeepc_laptop {
|
||||||
*/
|
*/
|
||||||
static int write_acpi_int(acpi_handle handle, const char *method, int val)
|
static int write_acpi_int(acpi_handle handle, const char *method, int val)
|
||||||
{
|
{
|
||||||
struct acpi_object_list params;
|
|
||||||
union acpi_object in_obj;
|
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
|
|
||||||
params.count = 1;
|
status = acpi_execute_simple_method(handle, (char *)method, val);
|
||||||
params.pointer = &in_obj;
|
|
||||||
in_obj.type = ACPI_TYPE_INTEGER;
|
|
||||||
in_obj.integer.value = val;
|
|
||||||
|
|
||||||
status = acpi_evaluate_object(handle, (char *)method, ¶ms, NULL);
|
|
||||||
return (status == AE_OK ? 0 : -1);
|
return (status == AE_OK ? 0 : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue