Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336679
b: refs/heads/master
c: 3ae45a2
h: refs/heads/master
i:
  336677: 6e8f0df
  336675: 9d065c1
  336671: 68dc67e
v: v3
  • Loading branch information
Rafael J. Wysocki committed Nov 14, 2012
1 parent 85c9e36 commit 3321aa9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 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: c5b18e22e74dc7dbd3f7729997a3a553ce761d2b
refs/heads/master: 3ae45a27df74358b4bcd3d5a67e47ad734a48945
21 changes: 13 additions & 8 deletions trunk/drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
* having a static work_struct.
*/

dpc = kmalloc(sizeof(struct acpi_os_dpc), GFP_ATOMIC);
dpc = kzalloc(sizeof(struct acpi_os_dpc), GFP_ATOMIC);
if (!dpc)
return AE_NO_MEMORY;

Expand All @@ -944,17 +944,22 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
* because the hotplug code may call driver .remove() functions,
* which invoke flush_scheduled_work/acpi_os_wait_events_complete
* to flush these workqueues.
*
* To prevent lockdep from complaining unnecessarily, make sure that
* there is a different static lockdep key for each workqueue by using
* INIT_WORK() for each of them separately.
*/
queue = hp ? kacpi_hotplug_wq :
(type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq);
dpc->wait = hp ? 1 : 0;

if (queue == kacpi_hotplug_wq)
if (hp) {
queue = kacpi_hotplug_wq;
dpc->wait = 1;
INIT_WORK(&dpc->work, acpi_os_execute_deferred);
else if (queue == kacpi_notify_wq)
} else if (type == OSL_NOTIFY_HANDLER) {
queue = kacpi_notify_wq;
INIT_WORK(&dpc->work, acpi_os_execute_deferred);
else
} else {
queue = kacpid_wq;
INIT_WORK(&dpc->work, acpi_os_execute_deferred);
}

/*
* On some machines, a software-initiated SMI causes corruption unless
Expand Down

0 comments on commit 3321aa9

Please sign in to comment.