fix file specification in comments
[powerpc.git] / include / linux / workqueue.h
index 2a7b38d..f16ba1e 100644 (file)
@@ -121,6 +121,12 @@ struct execute_work {
                init_timer(&(_work)->timer);                    \
        } while (0)
 
+#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func)                     \
+       do {                                                    \
+               INIT_WORK(&(_work)->work, (_func));             \
+               init_timer_deferrable(&(_work)->timer);         \
+       } while (0)
+
 /**
  * work_pending - Find out whether a work item is currently pending
  * @work: The work item in question
@@ -191,14 +197,15 @@ int execute_in_process_context(work_func_t fn, struct execute_work *);
 
 /*
  * Kill off a pending schedule_delayed_work().  Note that the work callback
- * function may still be running on return from cancel_delayed_work().  Run
- * flush_scheduled_work() to wait on it.
+ * function may still be running on return from cancel_delayed_work(), unless
+ * it returns 1 and the work doesn't re-arm itself. Run flush_workqueue() or
+ * cancel_work_sync() to wait on it.
  */
 static inline int cancel_delayed_work(struct delayed_work *work)
 {
        int ret;
 
-       ret = del_timer_sync(&work->timer);
+       ret = del_timer(&work->timer);
        if (ret)
                work_release(&work->work);
        return ret;