diff options
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
-rw-r--r-- | drivers/acpi/acpi_processor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index c29c2c3ec0ad..52c81c49cc7d 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c | |||
@@ -170,6 +170,9 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr) | |||
170 | acpi_status status; | 170 | acpi_status status; |
171 | int ret; | 171 | int ret; |
172 | 172 | ||
173 | if (pr->apic_id == -1) | ||
174 | return -ENODEV; | ||
175 | |||
173 | status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta); | 176 | status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta); |
174 | if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) | 177 | if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) |
175 | return -ENODEV; | 178 | return -ENODEV; |
@@ -260,10 +263,8 @@ static int acpi_processor_get_info(struct acpi_device *device) | |||
260 | } | 263 | } |
261 | 264 | ||
262 | apic_id = acpi_get_apicid(pr->handle, device_declaration, pr->acpi_id); | 265 | apic_id = acpi_get_apicid(pr->handle, device_declaration, pr->acpi_id); |
263 | if (apic_id < 0) { | 266 | if (apic_id < 0) |
264 | acpi_handle_debug(pr->handle, "failed to get CPU APIC ID.\n"); | 267 | acpi_handle_debug(pr->handle, "failed to get CPU APIC ID.\n"); |
265 | return -ENODEV; | ||
266 | } | ||
267 | pr->apic_id = apic_id; | 268 | pr->apic_id = apic_id; |
268 | 269 | ||
269 | cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id); | 270 | cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id); |
@@ -404,7 +405,6 @@ static int acpi_processor_add(struct acpi_device *device, | |||
404 | goto err; | 405 | goto err; |
405 | 406 | ||
406 | pr->dev = dev; | 407 | pr->dev = dev; |
407 | dev->offline = pr->flags.need_hotplug_init; | ||
408 | 408 | ||
409 | /* Trigger the processor driver's .probe() if present. */ | 409 | /* Trigger the processor driver's .probe() if present. */ |
410 | if (device_attach(dev) >= 0) | 410 | if (device_attach(dev) >= 0) |