aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2013-09-02 20:31:52 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-09-23 19:37:54 -0400
commit6c7fe47a4a3c6e243830ba5f9c6908a38f5ee3ed (patch)
tree9413160c7803da051280b460452249603df3afd8 /drivers/platform
parentfca41991296444ebab32c0fc9850c62d838082f2 (diff)
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: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 52b8a97efde1..29738cb2e3dd 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -317,8 +317,6 @@ static enum led_brightness kblamps_get(struct led_classdev *cdev)
317static int set_lcd_level(int level) 317static int set_lcd_level(int level)
318{ 318{
319 acpi_status status = AE_OK; 319 acpi_status status = AE_OK;
320 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
321 struct acpi_object_list arg_list = { 1, &arg0 };
322 acpi_handle handle = NULL; 320 acpi_handle handle = NULL;
323 321
324 vdbg_printk(FUJLAPTOP_DBG_TRACE, "set lcd level via SBLL [%d]\n", 322 vdbg_printk(FUJLAPTOP_DBG_TRACE, "set lcd level via SBLL [%d]\n",
@@ -333,9 +331,8 @@ static int set_lcd_level(int level)
333 return -ENODEV; 331 return -ENODEV;
334 } 332 }
335 333
336 arg0.integer.value = level;
337 334
338 status = acpi_evaluate_object(handle, NULL, &arg_list, NULL); 335 status = acpi_execute_simple_method(handle, NULL, level);
339 if (ACPI_FAILURE(status)) 336 if (ACPI_FAILURE(status))
340 return -ENODEV; 337 return -ENODEV;
341 338
@@ -345,8 +342,6 @@ static int set_lcd_level(int level)
345static int set_lcd_level_alt(int level) 342static int set_lcd_level_alt(int level)
346{ 343{
347 acpi_status status = AE_OK; 344 acpi_status status = AE_OK;
348 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
349 struct acpi_object_list arg_list = { 1, &arg0 };
350 acpi_handle handle = NULL; 345 acpi_handle handle = NULL;
351 346
352 vdbg_printk(FUJLAPTOP_DBG_TRACE, "set lcd level via SBL2 [%d]\n", 347 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 return -ENODEV; 356 return -ENODEV;
362 } 357 }
363 358
364 arg0.integer.value = level; 359 status = acpi_execute_simple_method(handle, NULL, level);
365
366 status = acpi_evaluate_object(handle, NULL, &arg_list, NULL);
367 if (ACPI_FAILURE(status)) 360 if (ACPI_FAILURE(status))
368 return -ENODEV; 361 return -ENODEV;
369 362