Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286500
b: refs/heads/master
c: 3bd81a8
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Renninger authored and Len Brown committed Jan 18, 2012
1 parent 1830aba commit bd93d55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e7590d40dc59d5c1889d9e70c9da1f1df3918c6
refs/heads/master: 3bd81a8710710f8bf5d1a5ebac315c842c20bdd3
17 changes: 8 additions & 9 deletions trunk/drivers/acpi/processor_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ MODULE_LICENSE("GPL");
static int acpi_processor_add(struct acpi_device *device);
static int acpi_processor_remove(struct acpi_device *device, int type);
static void acpi_processor_notify(struct acpi_device *device, u32 event);
static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu);
static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr);
static int acpi_processor_handle_eject(struct acpi_processor *pr);


Expand Down Expand Up @@ -324,10 +324,8 @@ static int acpi_processor_get_info(struct acpi_device *device)
* they are physically not present.
*/
if (pr->id == -1) {
if (ACPI_FAILURE
(acpi_processor_hotadd_init(pr->handle, &pr->id))) {
if (ACPI_FAILURE(acpi_processor_hotadd_init(pr)))
return -ENODEV;
}
}
/*
* On some boxes several processors use the same processor bus id.
Expand Down Expand Up @@ -721,18 +719,19 @@ processor_walk_namespace_cb(acpi_handle handle,
return (AE_OK);
}

static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr)
{
acpi_handle handle = pr->handle;

if (!is_processor_present(handle)) {
return AE_ERROR;
}

if (acpi_map_lsapic(handle, p_cpu))
if (acpi_map_lsapic(handle, &pr->id))
return AE_ERROR;

if (arch_register_cpu(*p_cpu)) {
acpi_unmap_lsapic(*p_cpu);
if (arch_register_cpu(pr->id)) {
acpi_unmap_lsapic(pr->id);
return AE_ERROR;
}

Expand All @@ -749,7 +748,7 @@ static int acpi_processor_handle_eject(struct acpi_processor *pr)
return (0);
}
#else
static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr)
{
return AE_ERROR;
}
Expand Down

0 comments on commit bd93d55

Please sign in to comment.