diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-09-03 02:32:09 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-24 01:37:56 +0200 |
commit | 6ebb5bc9e61be4315202c15a0f53f636e8f0bf2e (patch) | |
tree | 8deb5fddff2695698292dd55e0a4bf27b004f14c /drivers/acpi/acpi_processor.c | |
parent | pnpacpi: convert acpi_get_handle() to acpi_has_method() (diff) | |
download | linux-6ebb5bc9e61be4315202c15a0f53f636e8f0bf2e.tar.xz linux-6ebb5bc9e61be4315202c15a0f53f636e8f0bf2e.zip |
acpi_processor: convert acpi_evaluate_object() to acpi_evaluate_integer()
acpi_evaluate_integer() is an ACPI API introduced to evaluate an
ACPI control method that is known to have an integer return value.
This API can simplify the code because the calling function does not need to
use the specified acpi_buffer structure required by acpi_evaluate_object();
Convert acpi_evaluate_object() to acpi_evaluate_integer()
in drivers/acpi/acpi_processor.c in this patch.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
-rw-r--r-- | drivers/acpi/acpi_processor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index f29e06efa479..357abdc1406a 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -219,6 +219,7 @@ static int acpi_processor_get_info(struct acpi_device *device) int cpu_index, device_declaration = 0; acpi_status status = AE_OK; static int cpu0_initialized; + unsigned long long value; if (num_online_cpus() > 1) errata.smp = TRUE; @@ -258,7 +259,6 @@ static int acpi_processor_get_info(struct acpi_device *device) * Declared with "Device" statement; match _UID. * Note that we don't handle string _UIDs yet. */ - unsigned long long value; status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID, NULL, &value); if (ACPI_FAILURE(status)) { @@ -332,9 +332,9 @@ static int acpi_processor_get_info(struct acpi_device *device) * ensure we get the right value in the "physical id" field * of /proc/cpuinfo */ - status = acpi_evaluate_object(pr->handle, "_SUN", NULL, &buffer); + status = acpi_evaluate_integer(pr->handle, "_SUN", NULL, &value); if (ACPI_SUCCESS(status)) - arch_fix_phys_package_id(pr->id, object.integer.value); + arch_fix_phys_package_id(pr->id, value); return 0; } |