Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b408a054 authored by Zhang Rui's avatar Zhang Rui Committed by Rafael J. Wysocki
Browse files

olpc_xo15_sci: 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 arch/x86/platform/olpc/olpc-xo15-sci.c

Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
CC: Daniel Drake <dsd@laptop.org>
CC: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 4a10c2ac
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -40,16 +40,9 @@ static bool lid_wake_on_close;
 */
static int set_lid_wake_behavior(bool wake_on_close)
{
	struct acpi_object_list arg_list;
	union acpi_object arg;
	acpi_status status;

	arg_list.count		= 1;
	arg_list.pointer	= &arg;
	arg.type		= ACPI_TYPE_INTEGER;
	arg.integer.value	= wake_on_close;

	status = acpi_evaluate_object(NULL, "\\_SB.PCI0.LID.LIDW", &arg_list, NULL);
	status = acpi_execute_simple_method(NULL, "\\_SB.PCI0.LID.LIDW", wake_on_close);
	if (ACPI_FAILURE(status)) {
		pr_warning(PFX "failed to set lid behavior\n");
		return 1;