Commit 97206f2c authored by Maximilian Attems's avatar Maximilian Attems Committed by Linus Torvalds

[PATCH] janitor: drivers/message: replace schedule_timeout() with msleep_interruptible()

Use msleep_interruptible() instead of schedule_timeout() under drivers/message.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4a7b9aa4
......@@ -2195,8 +2195,7 @@ MakeIocReady(MPT_ADAPTER *ioc, int force, int sleepFlag)
}
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 * HZ / 1000);
msleep_interruptible(1);
} else {
mdelay (1); /* 1 msec delay */
}
......@@ -2565,8 +2564,7 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepFlag)
state = mpt_GetIocState(ioc, 1);
while (state != MPI_IOC_STATE_OPERATIONAL && --cntdn) {
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 * HZ / 1000);
msleep_interruptible(1);
} else {
mdelay(1);
}
......@@ -2833,8 +2831,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, int sleepFlag)
/* wait 1 msec */
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 * HZ / 1000);
msleep_interruptible(1);
} else {
mdelay (1);
}
......@@ -2851,8 +2848,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, int sleepFlag)
}
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1000 * HZ / 1000);
msleep_interruptible (1000);
} else {
mdelay (1000);
}
......@@ -2952,8 +2948,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, int sleepFlag)
return 0;
}
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(10 * HZ / 1000);
msleep_interruptible (10);
} else {
mdelay (10);
}
......@@ -3004,8 +2999,7 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag)
SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag);
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1000 * HZ / 1000);
msleep_interruptible (1000);
} else {
mdelay (1000);
}
......@@ -3027,8 +3021,7 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag)
return hard_reset_done;
}
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(10 * HZ / 1000);
msleep_interruptible (10);
} else {
mdelay (10);
}
......@@ -3099,8 +3092,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
/* wait 100 msec */
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(100 * HZ / 1000);
msleep_interruptible (100);
} else {
mdelay (100);
}
......@@ -3207,8 +3199,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
/* wait 1 sec */
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1000 * HZ / 1000);
msleep_interruptible (1000);
} else {
mdelay (1000);
}
......@@ -3242,8 +3233,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
/* wait 100 msec */
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(100 * HZ / 1000);
msleep_interruptible (100);
} else {
mdelay (100);
}
......@@ -3337,8 +3327,7 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag)
}
if (sleepFlag == CAN_SLEEP) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 * HZ / 1000);
msleep_interruptible(1);
} else {
mdelay (1); /* 1 msec delay */
}
......@@ -3775,8 +3764,7 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS))
break;
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 * HZ / 1000);
msleep_interruptible (1);
count++;
}
} else {
......@@ -3825,8 +3813,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
if (intstat & MPI_HIS_DOORBELL_INTERRUPT)
break;
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1 * HZ / 1000);
msleep_interruptible(1);
count++;
}
} else {
......
......@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/i2o.h>
#include <linux/delay.h>
/* Exec OSM functions */
extern struct bus_type i2o_bus_type;
......@@ -106,8 +107,7 @@ int i2o_device_claim_release(struct i2o_device *dev)
if (!rc)
break;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ);
ssleep(1);
}
if (!rc)
......
......@@ -29,6 +29,7 @@
#include <linux/module.h>
#include <linux/i2o.h>
#include <linux/delay.h>
struct i2o_driver i2o_exec_driver;
......@@ -151,7 +152,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, u32 m, unsigned long
prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE);
if (!iwait->complete)
schedule_timeout(timeout * HZ);
msleep_interruptible(timeout * 1000);
finish_wait(&wq, &wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment