diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-09-02 20:31:51 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:37:54 -0400 |
commit | fca41991296444ebab32c0fc9850c62d838082f2 (patch) | |
tree | 7998cdd7249863ac9a9ddfcaac91116fe8f9312b /drivers/platform | |
parent | 5e8ac96f2969aa7b73f630259ce7f5e40e2f8edd (diff) |
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index a6afd4108beb..aefcc32e5634 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -190,16 +190,10 @@ struct eeepc_laptop { | |||
190 | */ | 190 | */ |
191 | static int write_acpi_int(acpi_handle handle, const char *method, int val) | 191 | static int write_acpi_int(acpi_handle handle, const char *method, int val) |
192 | { | 192 | { |
193 | struct acpi_object_list params; | ||
194 | union acpi_object in_obj; | ||
195 | acpi_status status; | 193 | acpi_status status; |
196 | 194 | ||
197 | params.count = 1; | 195 | status = acpi_execute_simple_method(handle, (char *)method, val); |
198 | params.pointer = &in_obj; | ||
199 | in_obj.type = ACPI_TYPE_INTEGER; | ||
200 | in_obj.integer.value = val; | ||
201 | 196 | ||
202 | status = acpi_evaluate_object(handle, (char *)method, ¶ms, NULL); | ||
203 | return (status == AE_OK ? 0 : -1); | 197 | return (status == AE_OK ? 0 : -1); |
204 | } | 198 | } |
205 | 199 | ||