diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-27 01:25:28 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-27 01:25:28 +0200 |
commit | c92f56cbdfc08c8c207c9476c69c99fdbadbd77b (patch) | |
tree | c38480e47fc7c85ea609a6f882f5c5143c33cb74 /drivers/acpi/processor_perflib.c | |
parent | d8dfad3876e4386666b759da3c833d62fb8b2267 (diff) | |
parent | 0177f29fea534ef5e6af2d76e9a9be0fdd325c4d (diff) |
Merge branch 'acpi-cleanup'
* acpi-cleanup: (21 commits)
ACPI / dock: fix error return code in dock_add()
ACPI / dock: Drop unnecessary local variable from dock_add()
ACPI / dock / PCI: Drop ACPI dock notifier chain
ACPI / dock: Do not check CONFIG_ACPI_DOCK_MODULE
ACPI / dock: Do not leak memory on falilures to add a dock station
ACPI: Drop ACPI bus notifier call chain
ACPI / dock: Rework the handling of notifications
ACPI / dock: Simplify dock_init_hotplug() and dock_release_hotplug()
ACPI / dock: Walk list in reverse order during removal of devices
ACPI / dock: Rework and simplify find_dock_devices()
ACPI / dock: Drop the hp_lock mutex from struct dock_station
ACPI: simplify acpiphp driver with new helper functions
ACPI: simplify dock driver with new helper functions
ACPI: Export acpi_(bay)|(dock)_match() from scan.c
ACPI: introduce two helper functions for _EJ0 and _LCK
ACPI: introduce helper function acpi_execute_simple_method()
ACPI: introduce helper function acpi_has_method()
ACPI / dock: simplify dock_create_acpi_device()
ACPI / dock: mark initialization functions with __init
ACPI / dock: drop redundant spin lock in dock station object
...
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r-- | drivers/acpi/processor_perflib.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 1e9732d809bf..51d7948611da 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -164,17 +164,12 @@ static void acpi_processor_ppc_ost(acpi_handle handle, int status) {.type = ACPI_TYPE_INTEGER,}, }; struct acpi_object_list arg_list = {2, params}; - acpi_handle temp; - params[0].integer.value = ACPI_PROCESSOR_NOTIFY_PERFORMANCE; - params[1].integer.value = status; - - /* when there is no _OST , skip it */ - if (ACPI_FAILURE(acpi_get_handle(handle, "_OST", &temp))) - return; - - acpi_evaluate_object(handle, "_OST", &arg_list, NULL); - return; + if (acpi_has_method(handle, "_OST")) { + params[0].integer.value = ACPI_PROCESSOR_NOTIFY_PERFORMANCE; + params[1].integer.value = status; + acpi_evaluate_object(handle, "_OST", &arg_list, NULL); + } } int acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag) @@ -468,14 +463,11 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) int acpi_processor_get_performance_info(struct acpi_processor *pr) { int result = 0; - acpi_status status = AE_OK; - acpi_handle handle = NULL; if (!pr || !pr->performance || !pr->handle) return -EINVAL; - status = acpi_get_handle(pr->handle, "_PCT", &handle); - if (ACPI_FAILURE(status)) { + if (!acpi_has_method(pr->handle, "_PCT")) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "ACPI-based processor performance control unavailable\n")); return -ENODEV; @@ -501,7 +493,7 @@ int acpi_processor_get_performance_info(struct acpi_processor *pr) */ update_bios: #ifdef CONFIG_X86 - if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ + if (acpi_has_method(pr->handle, "_PPC")) { if(boot_cpu_has(X86_FEATURE_EST)) printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " "frequency support\n"); |