Made waiting for device semaphore uninterruptible.
authorFlorian Pose <fp@igh-essen.com>
Mon, 12 Mar 2007 08:47:56 +0000
changeset 648 0a6d38ec463f
parent 647 dc556a8c8fed
child 649 a4d3fffdaed7
Made waiting for device semaphore uninterruptible.
master/master.c
master/module.c
--- a/master/master.c	Mon Mar 12 08:42:02 2007 +0000
+++ b/master/master.c	Mon Mar 12 08:47:56 2007 +0000
@@ -959,18 +959,13 @@
 
     off += sprintf(buffer + off, "\nDevices:\n");
     
-    if (down_interruptible(&master->device_sem)) {
-        EC_ERR("Interrupted while waiting for device!\n");
-        return -EINVAL;
-    }
-    
+    down(&master->device_sem);
     off += sprintf(buffer + off, "  Main: ");
     off += ec_master_device_info(&master->main_device,
             master->main_mac, buffer + off);
     off += sprintf(buffer + off, "  Backup: ");
     off += ec_master_device_info(&master->backup_device,
             master->backup_mac, buffer + off);
-
     up(&master->device_sem);
 
     off += sprintf(buffer + off, "\nTiming (min/avg/max) [us]:\n");
--- a/master/module.c	Mon Mar 12 08:42:02 2007 +0000
+++ b/master/module.c	Mon Mar 12 08:47:56 2007 +0000
@@ -403,11 +403,7 @@
             EC_INFO("Accepting device %s for master %u.\n",
                     str, master->index);
 
-            if (down_interruptible(&master->device_sem)) {
-                EC_ERR("Interrupted while waiting for device semaphore!\n");
-                return -1;
-            }
-
+            down(&master->device_sem);
             if (master->main_device.dev) {
                 EC_ERR("Master %u already has a device attached.\n",
                         master->index);
@@ -542,11 +538,8 @@
     master->reserved = 1;
     up(&master_sem);
 
-    if (down_interruptible(&master->device_sem)) {
-        EC_ERR("Interrupted while waiting for device!\n");
-        goto out_release;
-    }
-
+    down(&master->device_sem);
+    
     if (master->mode != EC_MASTER_MODE_IDLE) {
         up(&master->device_sem);
         EC_ERR("Master %u still waiting for devices!\n", master_index);