diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2013-06-28 12:24:39 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-14 19:33:10 -0400 |
commit | 0db98202605c3d32e023d43c30b5bd878f520976 (patch) | |
tree | 7aec122f45db5c6b6c2f046ccf1eb9fa160fb616 /drivers/acpi/power.c | |
parent | 952c63e9512b63220886105cfc791507046fa39a (diff) |
ACPI: introduce helper function acpi_execute_simple_method()
Introduce helper function acpi_execute_simple_method() and use it in
a number of places to simplify code.
[rjw: Changelog]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r-- | drivers/acpi/power.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 5c28c894c0fc..1460c88a7c0e 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
@@ -637,9 +637,7 @@ int acpi_device_sleep_wake(struct acpi_device *dev, | |||
637 | } | 637 | } |
638 | 638 | ||
639 | /* Execute _PSW */ | 639 | /* Execute _PSW */ |
640 | arg_list.count = 1; | 640 | status = acpi_execute_simple_method(dev->handle, "_PSW", enable); |
641 | in_arg[0].integer.value = enable; | ||
642 | status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); | ||
643 | if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { | 641 | if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { |
644 | printk(KERN_ERR PREFIX "_PSW execution failed\n"); | 642 | printk(KERN_ERR PREFIX "_PSW execution failed\n"); |
645 | dev->wakeup.flags.valid = 0; | 643 | dev->wakeup.flags.valid = 0; |