|
|
@@ -586,18 +586,10 @@ static void edac_mc_workq_setup(struct mem_ctl_info *mci, unsigned msec,
|
|
|
*/
|
|
|
static void edac_mc_workq_teardown(struct mem_ctl_info *mci)
|
|
|
{
|
|
|
- int status;
|
|
|
-
|
|
|
- if (mci->op_state != OP_RUNNING_POLL)
|
|
|
- return;
|
|
|
-
|
|
|
- status = cancel_delayed_work(&mci->work);
|
|
|
- if (status == 0) {
|
|
|
- edac_dbg(0, "not canceled, flush the queue\n");
|
|
|
+ mci->op_state = OP_OFFLINE;
|
|
|
|
|
|
- /* workq instance might be running, wait for it */
|
|
|
- flush_workqueue(edac_workqueue);
|
|
|
- }
|
|
|
+ cancel_delayed_work_sync(&mci->work);
|
|
|
+ flush_workqueue(edac_workqueue);
|
|
|
}
|
|
|
|
|
|
/*
|