diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-09-02 20:31:54 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:37:54 -0400 |
commit | 77c39851401121046b3129de9e5aeb2fd5ef7405 (patch) | |
tree | 3a7ee7de58b80a9e3a545deeef8b76ef94edeaa2 | |
parent | b92f7a9f94841f3f0d39127a83c8728505a82fd5 (diff) |
intel-smartconnect: 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/intel-smartconnect.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>
-rw-r--r-- | drivers/platform/x86/intel-smartconnect.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/platform/x86/intel-smartconnect.c b/drivers/platform/x86/intel-smartconnect.c index 52259dcabecb..898400865f40 100644 --- a/drivers/platform/x86/intel-smartconnect.c +++ b/drivers/platform/x86/intel-smartconnect.c | |||
@@ -25,10 +25,8 @@ MODULE_LICENSE("GPL"); | |||
25 | 25 | ||
26 | static int smartconnect_acpi_init(struct acpi_device *acpi) | 26 | static int smartconnect_acpi_init(struct acpi_device *acpi) |
27 | { | 27 | { |
28 | struct acpi_object_list input; | ||
29 | struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; | 28 | struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; |
30 | union acpi_object *result; | 29 | union acpi_object *result; |
31 | union acpi_object param; | ||
32 | acpi_status status; | 30 | acpi_status status; |
33 | 31 | ||
34 | status = acpi_evaluate_object(acpi->handle, "GAOS", NULL, &output); | 32 | status = acpi_evaluate_object(acpi->handle, "GAOS", NULL, &output); |
@@ -43,15 +41,8 @@ static int smartconnect_acpi_init(struct acpi_device *acpi) | |||
43 | } | 41 | } |
44 | 42 | ||
45 | if (result->integer.value & 0x1) { | 43 | if (result->integer.value & 0x1) { |
46 | param.type = ACPI_TYPE_INTEGER; | ||
47 | param.integer.value = 0; | ||
48 | |||
49 | input.count = 1; | ||
50 | input.pointer = ¶m; | ||
51 | |||
52 | dev_info(&acpi->dev, "Disabling Intel Smart Connect\n"); | 44 | dev_info(&acpi->dev, "Disabling Intel Smart Connect\n"); |
53 | status = acpi_evaluate_object(acpi->handle, "SAOS", &input, | 45 | status = acpi_execute_simple_method(acpi->handle, "SAOS", 0); |
54 | NULL); | ||
55 | } | 46 | } |
56 | 47 | ||
57 | kfree(result); | 48 | kfree(result); |