Fixed workqueue cancelling.
authorFlorian Pose <fp@igh-essen.com>
Mon, 06 Nov 2006 14:15:21 +0000
changeset 481 d45c3111c0af
parent 480 649502e50901
child 482 fbaaaf2a6234
Fixed workqueue cancelling.
master/master.c
--- a/master/master.c	Mon Nov 06 09:51:42 2006 +0000
+++ b/master/master.c	Mon Nov 06 14:15:21 2006 +0000
@@ -344,7 +344,7 @@
     ec_master_eoe_stop(master);
 
     master->mode = EC_MASTER_MODE_ORPHANED;
-    if (!cancel_delayed_work(&master->idle_work)) {
+    while (!cancel_delayed_work(&master->idle_work)) {
         flush_workqueue(master->workqueue);
     }
 
@@ -362,7 +362,7 @@
     ec_datagram_t *datagram = &master->fsm.datagram;
 
     master->mode = EC_MASTER_MODE_OPERATION;
-    if (!cancel_delayed_work(&master->idle_work)) {
+    while (!cancel_delayed_work(&master->idle_work)) {
         flush_workqueue(master->workqueue);
     }