1 // SPDX-License-Identifier: GPL-2.0-only
2 #include "edac_module.h"
4 static struct workqueue_struct
*wq
;
6 bool edac_queue_work(struct delayed_work
*work
, unsigned long delay
)
8 return queue_delayed_work(wq
, work
, delay
);
10 EXPORT_SYMBOL_GPL(edac_queue_work
);
12 bool edac_mod_work(struct delayed_work
*work
, unsigned long delay
)
14 return mod_delayed_work(wq
, work
, delay
);
16 EXPORT_SYMBOL_GPL(edac_mod_work
);
18 bool edac_stop_work(struct delayed_work
*work
)
22 ret
= cancel_delayed_work_sync(work
);
27 EXPORT_SYMBOL_GPL(edac_stop_work
);
29 int edac_workqueue_setup(void)
31 wq
= alloc_ordered_workqueue("edac-poller", WQ_MEM_RECLAIM
);
38 void edac_workqueue_teardown(void)
41 destroy_workqueue(wq
);