diff options
author | Thomas Renninger <trenn@suse.de> | 2012-01-17 16:40:07 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-01-17 23:58:07 -0500 |
commit | 3bd81a8710710f8bf5d1a5ebac315c842c20bdd3 (patch) | |
tree | e22e863c7bcecb9af00f36d83c5c29886dfa3566 /drivers/acpi | |
parent | 5e7590d40dc59d5c1889d9e70c9da1f1df3918c6 (diff) |
ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
V2: Fix typo: pr->handle -> pr, here: acpi_processor_hotadd_init(pr)
This is a very small part taken from patches which afaik
are coming from Yunhong Jiang (for a Xen not a Linus repo?).
Cleanup only: no functional change.
Advantage (beside cleanup) is that other data of the pr (acpi_processor) struct
in the acpi_processor_hotadd_init() is needed later, for example a newly
introduced flag:
pr->flags.need_hotplug_init
Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: Bjorn Helgaas <bhelgaas@google.com>
CC: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_driver.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 3616ce5509c8..b9cbd9b09450 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -82,7 +82,7 @@ MODULE_LICENSE("GPL"); | |||
82 | static int acpi_processor_add(struct acpi_device *device); | 82 | static int acpi_processor_add(struct acpi_device *device); |
83 | static int acpi_processor_remove(struct acpi_device *device, int type); | 83 | static int acpi_processor_remove(struct acpi_device *device, int type); |
84 | static void acpi_processor_notify(struct acpi_device *device, u32 event); | 84 | static void acpi_processor_notify(struct acpi_device *device, u32 event); |
85 | static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); | 85 | static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr); |
86 | static int acpi_processor_handle_eject(struct acpi_processor *pr); | 86 | static int acpi_processor_handle_eject(struct acpi_processor *pr); |
87 | 87 | ||
88 | 88 | ||
@@ -324,10 +324,8 @@ static int acpi_processor_get_info(struct acpi_device *device) | |||
324 | * they are physically not present. | 324 | * they are physically not present. |
325 | */ | 325 | */ |
326 | if (pr->id == -1) { | 326 | if (pr->id == -1) { |
327 | if (ACPI_FAILURE | 327 | if (ACPI_FAILURE(acpi_processor_hotadd_init(pr))) |
328 | (acpi_processor_hotadd_init(pr->handle, &pr->id))) { | ||
329 | return -ENODEV; | 328 | return -ENODEV; |
330 | } | ||
331 | } | 329 | } |
332 | /* | 330 | /* |
333 | * On some boxes several processors use the same processor bus id. | 331 | * On some boxes several processors use the same processor bus id. |
@@ -721,18 +719,19 @@ processor_walk_namespace_cb(acpi_handle handle, | |||
721 | return (AE_OK); | 719 | return (AE_OK); |
722 | } | 720 | } |
723 | 721 | ||
724 | static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu) | 722 | static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr) |
725 | { | 723 | { |
724 | acpi_handle handle = pr->handle; | ||
726 | 725 | ||
727 | if (!is_processor_present(handle)) { | 726 | if (!is_processor_present(handle)) { |
728 | return AE_ERROR; | 727 | return AE_ERROR; |
729 | } | 728 | } |
730 | 729 | ||
731 | if (acpi_map_lsapic(handle, p_cpu)) | 730 | if (acpi_map_lsapic(handle, &pr->id)) |
732 | return AE_ERROR; | 731 | return AE_ERROR; |
733 | 732 | ||
734 | if (arch_register_cpu(*p_cpu)) { | 733 | if (arch_register_cpu(pr->id)) { |
735 | acpi_unmap_lsapic(*p_cpu); | 734 | acpi_unmap_lsapic(pr->id); |
736 | return AE_ERROR; | 735 | return AE_ERROR; |
737 | } | 736 | } |
738 | 737 | ||
@@ -749,7 +748,7 @@ static int acpi_processor_handle_eject(struct acpi_processor *pr) | |||
749 | return (0); | 748 | return (0); |
750 | } | 749 | } |
751 | #else | 750 | #else |
752 | static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu) | 751 | static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr) |
753 | { | 752 | { |
754 | return AE_ERROR; | 753 | return AE_ERROR; |
755 | } | 754 | } |