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

fujitsu-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/fujitsu-laptop.c
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
CC: Matthew Garrett <matthew.garrett@nebula.com>
Acked-by: NJonathan Woithe <jwoithe@just42.net>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 fca41991
...@@ -317,8 +317,6 @@ static enum led_brightness kblamps_get(struct led_classdev *cdev) ...@@ -317,8 +317,6 @@ static enum led_brightness kblamps_get(struct led_classdev *cdev)
static int set_lcd_level(int level) static int set_lcd_level(int level)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
struct acpi_object_list arg_list = { 1, &arg0 };
acpi_handle handle = NULL; acpi_handle handle = NULL;
vdbg_printk(FUJLAPTOP_DBG_TRACE, "set lcd level via SBLL [%d]\n", vdbg_printk(FUJLAPTOP_DBG_TRACE, "set lcd level via SBLL [%d]\n",
...@@ -333,9 +331,8 @@ static int set_lcd_level(int level) ...@@ -333,9 +331,8 @@ static int set_lcd_level(int level)
return -ENODEV; return -ENODEV;
} }
arg0.integer.value = level;
status = acpi_evaluate_object(handle, NULL, &arg_list, NULL); status = acpi_execute_simple_method(handle, NULL, level);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return -ENODEV; return -ENODEV;
...@@ -345,8 +342,6 @@ static int set_lcd_level(int level) ...@@ -345,8 +342,6 @@ static int set_lcd_level(int level)
static int set_lcd_level_alt(int level) static int set_lcd_level_alt(int level)
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
struct acpi_object_list arg_list = { 1, &arg0 };
acpi_handle handle = NULL; acpi_handle handle = NULL;
vdbg_printk(FUJLAPTOP_DBG_TRACE, "set lcd level via SBL2 [%d]\n", vdbg_printk(FUJLAPTOP_DBG_TRACE, "set lcd level via SBL2 [%d]\n",
...@@ -361,9 +356,7 @@ static int set_lcd_level_alt(int level) ...@@ -361,9 +356,7 @@ static int set_lcd_level_alt(int level)
return -ENODEV; return -ENODEV;
} }
arg0.integer.value = level; status = acpi_execute_simple_method(handle, NULL, level);
status = acpi_evaluate_object(handle, NULL, &arg_list, NULL);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return -ENODEV; return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册