[PATCH 06/27] intel-smartconnect: convert acpi_evaluate_object() to acpi_execute_simple_method()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
CC: Matthew Garrett <matthew.garrett@xxxxxxxxxx>
CC: platform-driver-x86@xxxxxxxxxxxxxxx
---
 drivers/platform/x86/intel-smartconnect.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/platform/x86/intel-smartconnect.c b/drivers/platform/x86/intel-smartconnect.c
index f74e93d..9758b00 100644
--- a/drivers/platform/x86/intel-smartconnect.c
+++ b/drivers/platform/x86/intel-smartconnect.c
@@ -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);
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux