Minor changes in EEPROM write code.
authorFlorian Pose <fp@igh-essen.com>
Fri, 02 Mar 2007 14:47:09 +0000
changeset 606 a82c53d6a5d4
parent 605 96a894895999
child 607 7b1daa325c5f
Minor changes in EEPROM write code.
master/slave.c
--- a/master/slave.c	Fri Mar 02 14:35:49 2007 +0000
+++ b/master/slave.c	Fri Mar 02 14:47:09 2007 +0000
@@ -839,12 +839,13 @@
         if (request.state == EC_EEPROM_REQ_QUEUED) {
             list_del(&request.list);
             up(&master->eeprom_sem);
-            return -EPERM;
-        }
-        // request processing: interrupt not possible.
+            return -EINTR;
+        }
+        // request already processing: interrupt not possible.
         up(&master->eeprom_sem);
     }
 
+    // wait until master FSM has finished processing
     wait_event(master->eeprom_queue, request.state != EC_EEPROM_REQ_BUSY);
 
     return request.state == EC_EEPROM_REQ_COMPLETED ? size : -EIO;