提交 a7f6451f 编写于 作者: Z Zhang Rui 提交者: Rafael J. Wysocki

topstar-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/topstar-laptop.c
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
CC: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
CC: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 77c39851
......@@ -80,13 +80,9 @@ static void acpi_topstar_notify(struct acpi_device *device, u32 event)
static int acpi_topstar_fncx_switch(struct acpi_device *device, bool state)
{
acpi_status status;
union acpi_object fncx_params[1] = {
{ .type = ACPI_TYPE_INTEGER }
};
struct acpi_object_list fncx_arg_list = { 1, &fncx_params[0] };
fncx_params[0].integer.value = state ? 0x86 : 0x87;
status = acpi_evaluate_object(device->handle, "FNCX", &fncx_arg_list, NULL);
status = acpi_execute_simple_method(device->handle, "FNCX",
state ? 0x86 : 0x87);
if (ACPI_FAILURE(status)) {
pr_err("Unable to switch FNCX notifications\n");
return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册