diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-09-02 20:31:56 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:37:54 -0400 |
commit | 619400dae9f2ee46ffa0a15a4a8a34a306b2aa24 (patch) | |
tree | b0ad4b02b59533a1f72ca985f379568e2e3c76be /drivers/platform | |
parent | a7f6451f0c78dcca2de1569edbf55fa30c9bae71 (diff) |
toshiba_acpi: 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/toshiba_acpi.c
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
CC: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index eb3467ea6d86..4c0e6579c4ca 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
@@ -191,16 +191,9 @@ static __inline__ void _set_bit(u32 * word, u32 mask, int value) | |||
191 | 191 | ||
192 | static int write_acpi_int(const char *methodName, int val) | 192 | static int write_acpi_int(const char *methodName, int val) |
193 | { | 193 | { |
194 | struct acpi_object_list params; | ||
195 | union acpi_object in_objs[1]; | ||
196 | acpi_status status; | 194 | acpi_status status; |
197 | 195 | ||
198 | params.count = ARRAY_SIZE(in_objs); | 196 | status = acpi_execute_simple_method(NULL, (char *)methodName, val); |
199 | params.pointer = in_objs; | ||
200 | in_objs[0].type = ACPI_TYPE_INTEGER; | ||
201 | in_objs[0].integer.value = val; | ||
202 | |||
203 | status = acpi_evaluate_object(NULL, (char *)methodName, ¶ms, NULL); | ||
204 | return (status == AE_OK) ? 0 : -EIO; | 197 | return (status == AE_OK) ? 0 : -EIO; |
205 | } | 198 | } |
206 | 199 | ||