Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336678
b: refs/heads/master
c: c5b18e2
h: refs/heads/master
v: v3
  • Loading branch information
Toshi Kani authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent 6e8f0df commit 85c9e36
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 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: 61622accd05b158d05f967b627e72da23d64f2ed
refs/heads/master: c5b18e22e74dc7dbd3f7729997a3a553ce761d2b
27 changes: 17 additions & 10 deletions trunk/drivers/acpi/processor_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
static void acpi_processor_hotplug_notify(acpi_handle handle,
u32 event, void *data)
{
struct acpi_processor *pr;
struct acpi_device *device = NULL;
struct acpi_eject_event *ej_event = NULL;
u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */
int result;

Expand Down Expand Up @@ -728,20 +728,27 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,
"received ACPI_NOTIFY_EJECT_REQUEST\n"));

if (acpi_bus_get_device(handle, &device)) {
printk(KERN_ERR PREFIX
"Device don't exist, dropping EJECT\n");
pr_err(PREFIX "Device don't exist, dropping EJECT\n");
break;
}
pr = acpi_driver_data(device);
if (!pr) {
printk(KERN_ERR PREFIX
"Driver data is NULL, dropping EJECT\n");
if (!acpi_driver_data(device)) {
pr_err(PREFIX "Driver data is NULL, dropping EJECT\n");
break;
}

/* REVISIT: update when eject is supported */
ost_code = ACPI_OST_SC_EJECT_NOT_SUPPORTED;
break;
ej_event = kmalloc(sizeof(*ej_event), GFP_KERNEL);
if (!ej_event) {
pr_err(PREFIX "No memory, dropping EJECT\n");
break;
}

ej_event->handle = handle;
ej_event->event = ACPI_NOTIFY_EJECT_REQUEST;
acpi_os_hotplug_execute(acpi_bus_hot_remove_device,
(void *)ej_event);

/* eject is performed asynchronously */
return;

default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
Expand Down

0 comments on commit 85c9e36

Please sign in to comment.