Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165293
b: refs/heads/master
c: 9ac6185
h: refs/heads/master
i:
  165291: 3bd3c7e
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Sep 19, 2009
1 parent 40c51ac commit 77b759d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 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: d26f0528d588e596955bf296a609afe52eafc099
refs/heads/master: 9ac6185669d0d277c4082fa92ba8eb2e55534cbf
23 changes: 5 additions & 18 deletions trunk/drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct acpi_os_dpc {
acpi_osd_exec_callback function;
void *context;
struct work_struct work;
int wait;
};

#ifdef CONFIG_ACPI_CUSTOM_DSDT
Expand Down Expand Up @@ -703,21 +704,8 @@ static void acpi_os_execute_deferred(struct work_struct *work)
return;
}

dpc->function(dpc->context);
kfree(dpc);

return;
}

static void acpi_os_execute_hp_deferred(struct work_struct *work)
{
struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);
if (!dpc) {
printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
return;
}

acpi_os_wait_events_complete(NULL);
if (dpc->wait)
acpi_os_wait_events_complete(NULL);

dpc->function(dpc->context);
kfree(dpc);
Expand Down Expand Up @@ -746,7 +734,6 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
acpi_status status = AE_OK;
struct acpi_os_dpc *dpc;
struct workqueue_struct *queue;
work_func_t func;
int ret;
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
"Scheduling function [%p(%p)] for deferred execution.\n",
Expand Down Expand Up @@ -779,8 +766,8 @@ static acpi_status __acpi_os_execute(acpi_execute_type type,
*/
queue = hp ? kacpi_hotplug_wq :
(type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq);
func = hp ? acpi_os_execute_hp_deferred : acpi_os_execute_deferred;
INIT_WORK(&dpc->work, func);
dpc->wait = hp ? 1 : 0;
INIT_WORK(&dpc->work, acpi_os_execute_deferred);
ret = queue_work(queue, &dpc->work);

if (!ret) {
Expand Down

0 comments on commit 77b759d

Please sign in to comment.