intel-smartconnect: convert acpi_evaluate_object() to acpi_execute_simple_method()
authorZhang Rui <rui.zhang@intel.com>
Tue, 3 Sep 2013 00:31:54 +0000 (08:31 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Sep 2013 23:37:54 +0000 (01:37 +0200)
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>
drivers/platform/x86/intel-smartconnect.c

index 52259dcabecb8251edad2a0e0dc7eccb9b174500..898400865f40563abe4e044a4626fbb62691565c 100644 (file)
@@ -25,10 +25,8 @@ MODULE_LICENSE("GPL");
 
 static int smartconnect_acpi_init(struct acpi_device *acpi)
 {
-       struct acpi_object_list input;
        struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *result;
-       union acpi_object param;
        acpi_status status;
 
        status = acpi_evaluate_object(acpi->handle, "GAOS", NULL, &output);
@@ -43,15 +41,8 @@ static int smartconnect_acpi_init(struct acpi_device *acpi)
        }
 
        if (result->integer.value & 0x1) {
-               param.type = ACPI_TYPE_INTEGER;
-               param.integer.value = 0;
-
-               input.count = 1;
-               input.pointer = &param;
-
                dev_info(&acpi->dev, "Disabling Intel Smart Connect\n");
-               status = acpi_evaluate_object(acpi->handle, "SAOS", &input,
-                                             NULL);
+               status = acpi_execute_simple_method(acpi->handle, "SAOS", 0);
        }
 
        kfree(result);