Commit fe76dedd authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Jeff Garzik

[PATCH] net/gt96100eth: replace gt96100_delay() with msleep_interruptible()

Uses msleep_interruptible() instead of schedule_timeout()
in the gt96100_delay() function. Corrects one comment to correspond to
the code.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 9c7d05eb
...@@ -187,10 +187,8 @@ static void gt96100_delay(int ms) ...@@ -187,10 +187,8 @@ static void gt96100_delay(int ms)
{ {
if (in_interrupt()) if (in_interrupt())
return; return;
else { else
current->state = TASK_INTERRUPTIBLE; msleep_interruptible(ms);
schedule_timeout(ms*HZ/1000);
}
} }
static int static int
...@@ -527,7 +525,7 @@ abort(struct net_device *dev, u32 abort_bits) ...@@ -527,7 +525,7 @@ abort(struct net_device *dev, u32 abort_bits)
// wait for abort to complete // wait for abort to complete
while (GT96100ETH_READ(gp, GT96100_ETH_SDMA_COMM) & abort_bits) { while (GT96100ETH_READ(gp, GT96100_ETH_SDMA_COMM) & abort_bits) {
// snooze for 20 msec and check again // snooze for 1 msec and check again
gt96100_delay(1); gt96100_delay(1);
if (--timedout == 0) { if (--timedout == 0) {
......
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