diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-09-02 20:31:55 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:37:54 -0400 |
commit | a7f6451f0c78dcca2de1569edbf55fa30c9bae71 (patch) | |
tree | 3a4e150d58af5e884b1bc9633ecbf4c8aa0f2821 | |
parent | 77c39851401121046b3129de9e5aeb2fd5ef7405 (diff) |
topstar-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/topstar-laptop.c
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
CC: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
CC: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/platform/x86/topstar-laptop.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c index 4ab618c63b45..67897c8740ba 100644 --- a/drivers/platform/x86/topstar-laptop.c +++ b/drivers/platform/x86/topstar-laptop.c | |||
@@ -80,13 +80,9 @@ static void acpi_topstar_notify(struct acpi_device *device, u32 event) | |||
80 | static int acpi_topstar_fncx_switch(struct acpi_device *device, bool state) | 80 | static int acpi_topstar_fncx_switch(struct acpi_device *device, bool state) |
81 | { | 81 | { |
82 | acpi_status status; | 82 | acpi_status status; |
83 | union acpi_object fncx_params[1] = { | ||
84 | { .type = ACPI_TYPE_INTEGER } | ||
85 | }; | ||
86 | struct acpi_object_list fncx_arg_list = { 1, &fncx_params[0] }; | ||
87 | 83 | ||
88 | fncx_params[0].integer.value = state ? 0x86 : 0x87; | 84 | status = acpi_execute_simple_method(device->handle, "FNCX", |
89 | status = acpi_evaluate_object(device->handle, "FNCX", &fncx_arg_list, NULL); | 85 | state ? 0x86 : 0x87); |
90 | if (ACPI_FAILURE(status)) { | 86 | if (ACPI_FAILURE(status)) { |
91 | pr_err("Unable to switch FNCX notifications\n"); | 87 | pr_err("Unable to switch FNCX notifications\n"); |
92 | return -ENODEV; | 88 | return -ENODEV; |