Merge master.kernel.org:/home/rmk/linux-2.6-arm
[pandora-kernel.git] / kernel / workqueue.c
index 52ef419..91bacb1 100644 (file)
@@ -308,12 +308,9 @@ struct workqueue_struct *__create_workqueue(const char *name,
        struct workqueue_struct *wq;
        struct task_struct *p;
 
-       BUG_ON(strlen(name) > 10);
-
-       wq = kmalloc(sizeof(*wq), GFP_KERNEL);
+       wq = kzalloc(sizeof(*wq), GFP_KERNEL);
        if (!wq)
                return NULL;
-       memset(wq, 0, sizeof(*wq));
 
        wq->name = name;
        /* We don't need the distraction of CPUs appearing and vanishing. */
@@ -429,12 +426,13 @@ void flush_scheduled_work(void)
  * @wq:   the controlling workqueue structure
  * @work: the delayed work struct
  */
-static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
-                                       struct work_struct *work)
+void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
+                                      struct work_struct *work)
 {
        while (!cancel_delayed_work(work))
                flush_workqueue(wq);
 }
+EXPORT_SYMBOL(cancel_rearming_delayed_workqueue);
 
 /**
  * cancel_rearming_delayed_work - reliably kill off a delayed keventd
@@ -500,7 +498,7 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
        case CPU_UP_PREPARE:
                /* Create a new workqueue thread for it. */
                list_for_each_entry(wq, &workqueues, list) {
-                       if (create_workqueue_thread(wq, hotcpu) < 0) {
+                       if (!create_workqueue_thread(wq, hotcpu)) {
                                printk("workqueue for %i failed\n", hotcpu);
                                return NOTIFY_BAD;
                        }