diff options
Diffstat (limited to 'drivers/platform/x86/intel-smartconnect.c')
-rw-r--r-- | drivers/platform/x86/intel-smartconnect.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/drivers/platform/x86/intel-smartconnect.c b/drivers/platform/x86/intel-smartconnect.c index 52259dcabecb..1838400dc036 100644 --- a/drivers/platform/x86/intel-smartconnect.c +++ b/drivers/platform/x86/intel-smartconnect.c | |||
@@ -25,37 +25,18 @@ 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; | 28 | unsigned long long value; |
29 | struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
30 | union acpi_object *result; | ||
31 | union acpi_object param; | ||
32 | acpi_status status; | 29 | acpi_status status; |
33 | 30 | ||
34 | status = acpi_evaluate_object(acpi->handle, "GAOS", NULL, &output); | 31 | status = acpi_evaluate_integer(acpi->handle, "GAOS", NULL, &value); |
35 | if (!ACPI_SUCCESS(status)) | 32 | if (!ACPI_SUCCESS(status)) |
36 | return -EINVAL; | 33 | return -EINVAL; |
37 | 34 | ||
38 | result = output.pointer; | 35 | if (value & 0x1) { |
39 | |||
40 | if (result->type != ACPI_TYPE_INTEGER) { | ||
41 | kfree(result); | ||
42 | return -EINVAL; | ||
43 | } | ||
44 | |||
45 | 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"); | 36 | dev_info(&acpi->dev, "Disabling Intel Smart Connect\n"); |
53 | status = acpi_evaluate_object(acpi->handle, "SAOS", &input, | 37 | status = acpi_execute_simple_method(acpi->handle, "SAOS", 0); |
54 | NULL); | ||
55 | } | 38 | } |
56 | 39 | ||
57 | kfree(result); | ||
58 | |||
59 | return 0; | 40 | return 0; |
60 | } | 41 | } |
61 | 42 | ||