X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=drivers%2Facpi%2Fosl.c;h=433fdd7016071611186cc9c07f71041f5882d8a2;hp=77e1c629aa6b1e08497931045e2b3db331b31b4e;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9 diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 77e1c629a..433fdd701 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -66,6 +66,7 @@ extern char line_buf[80]; static unsigned int acpi_irq_irq; static OSD_HANDLER acpi_irq_handler; static void *acpi_irq_context; +static struct workqueue_struct *kacpid_wq; acpi_status acpi_os_initialize(void) @@ -80,6 +81,8 @@ acpi_os_initialize(void) return AE_NULL_ENTRY; } #endif + kacpid_wq = create_singlethread_workqueue("kacpid"); + BUG_ON(!kacpid_wq); return AE_OK; } @@ -92,6 +95,8 @@ acpi_os_terminate(void) acpi_irq_handler); } + destroy_workqueue(kacpid_wq); + return AE_OK; } @@ -654,8 +659,8 @@ acpi_os_queue_for_execution( task = (void *)(dpc+1); INIT_WORK(task, acpi_os_execute_deferred, (void*)dpc); - if (!schedule_work(task)) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to schedule_work() failed.\n")); + if (!queue_work(kacpid_wq, task)) { + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to queue_work() failed.\n")); kfree(dpc); status = AE_ERROR; } @@ -663,6 +668,13 @@ acpi_os_queue_for_execution( return_ACPI_STATUS (status); } +void +acpi_os_wait_events_complete( + void *context) +{ + flush_workqueue(kacpid_wq); +} + /* * Allocate the memory for a spinlock and initialize it. */