Fixed possible bug in master FSM concerning unqueueing of EEPROM write
authorFlorian Pose <fp@igh-essen.com>
Fri, 02 Mar 2007 07:45:00 +0000
changeset 603 7f281d7372c6
parent 602 0c58446dec3c
child 604 74ceacf42710
Fixed possible bug in master FSM concerning unqueueing of EEPROM write
requests.
master/fsm_master.c
--- a/master/fsm_master.c	Fri Mar 02 07:37:34 2007 +0000
+++ b/master/fsm_master.c	Fri Mar 02 07:45:00 2007 +0000
@@ -284,11 +284,11 @@
         )
 {
     ec_master_t *master = fsm->master;
-    ec_eeprom_write_request_t *request;
+    ec_eeprom_write_request_t *request, *next;
     ec_slave_t *slave;
 
     down(&master->eeprom_sem);
-    list_for_each_entry(request, &master->eeprom_requests, list) {
+    list_for_each_entry_safe(request, next, &master->eeprom_requests, list) {
         list_del_init(&request->list); // dequeue
         up(&master->eeprom_sem);