This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / ieee1394 / nodemgr.c
index a2859c0..cc9c999 100644 (file)
@@ -70,7 +70,8 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
                if (!ret)
                        break;
 
-               if (msleep_interruptible(334))
+               set_current_state(TASK_INTERRUPTIBLE);
+               if (schedule_timeout (HZ/3))
                        return -EINTR;
        }
 
@@ -1488,16 +1489,14 @@ static int nodemgr_host_thread(void *__hi)
                        break;
                }
 
-               if (hi->kill_me) {
-                       up(&nodemgr_serialize);
+               if (hi->kill_me)
                        break;
-               }
 
                /* Pause for 1/4 second in 1/16 second intervals,
                 * to make sure things settle down. */
                for (i = 0; i < 4 ; i++) {
                        set_current_state(TASK_INTERRUPTIBLE);
-                       if (msleep_interruptible(63)) {
+                       if (schedule_timeout(HZ/16)) {
                                up(&nodemgr_serialize);
                                goto caught_signal;
                        }
@@ -1515,10 +1514,8 @@ static int nodemgr_host_thread(void *__hi)
                                i = 0;
 
                        /* Check the kill_me again */
-                       if (hi->kill_me) {
-                               up(&nodemgr_serialize);
+                       if (hi->kill_me)
                                goto caught_signal;
-                       }
                }
 
                if (!nodemgr_check_irm_capability(host, reset_cycles)) {