From: Zhang Rui Date: Tue, 3 Sep 2013 00:31:51 +0000 (+0800) Subject: eeepc-laptop: convert acpi_evaluate_object() to acpi_execute_simple_method() X-Git-Tag: firefly_0821_release~176^2~4983^2~28^2~29 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fca41991296444ebab32c0fc9850c62d838082f2;p=firefly-linux-kernel-4.4.55.git eeepc-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/eeepc-laptop.c Signed-off-by: Zhang Rui CC: Matthew Garrett CC: Corentin Chary Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index a6afd4108beb..aefcc32e5634 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -190,16 +190,10 @@ struct eeepc_laptop { */ static int write_acpi_int(acpi_handle handle, const char *method, int val) { - struct acpi_object_list params; - union acpi_object in_obj; acpi_status status; - params.count = 1; - params.pointer = &in_obj; - in_obj.type = ACPI_TYPE_INTEGER; - in_obj.integer.value = val; + status = acpi_execute_simple_method(handle, (char *)method, val); - status = acpi_evaluate_object(handle, (char *)method, ¶ms, NULL); return (status == AE_OK ? 0 : -1); }