watchdog: pic32-dmt: Remove .owner field for driver
[linux/fpc-iii.git] / drivers / edac / wq.c
blob1b8c07e44fd8fd71558780347205e2cca4995ff4
1 #include "edac_module.h"
3 static struct workqueue_struct *wq;
5 bool edac_queue_work(struct delayed_work *work, unsigned long delay)
7 return queue_delayed_work(wq, work, delay);
9 EXPORT_SYMBOL_GPL(edac_queue_work);
11 bool edac_mod_work(struct delayed_work *work, unsigned long delay)
13 return mod_delayed_work(wq, work, delay);
15 EXPORT_SYMBOL_GPL(edac_mod_work);
17 bool edac_stop_work(struct delayed_work *work)
19 bool ret;
21 ret = cancel_delayed_work_sync(work);
22 flush_workqueue(wq);
24 return ret;
26 EXPORT_SYMBOL_GPL(edac_stop_work);
28 int edac_workqueue_setup(void)
30 wq = create_singlethread_workqueue("edac-poller");
31 if (!wq)
32 return -ENODEV;
33 else
34 return 0;
37 void edac_workqueue_teardown(void)
39 flush_workqueue(wq);
40 destroy_workqueue(wq);
41 wq = NULL;