Skip to contentSkip to conversation

scx200_acb: replace schedule_timeout()

PATCH New Nishanth Aravamudan 1 participant 1 message Jul 22, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scx200_acb: replace schedule_timeout()

I would appreciate any comments from the janitors list. This is one (of a few) places where I had to make a decision to set the state before the call to

schedule_timeout();

This of course affected any decision to replace the code with msleep() or not. Please inform if the other state from the one I used is desired.

Thanks,
Nish

Applys-to: 2.6.7

Description: Uses msleep() instead of schedule_timeout() to guarantee the task delays the requested time.

drivers/i2c/busses/scx200_acb.c +2 -1
@@ -32,6 +32,7 @@
 #include <linux/i2c.h>
 #include <linux/smp_lock.h>
 #include <linux/pci.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 
 #include <linux/scx200.h>
@@ -254,7 +255,7 @@ static void scx200_acb_poll(struct scx20
 			scx200_acb_machine(iface, status);
 			return;
 		}
-		schedule_timeout(HZ/100+1);
+		msleep(10);		/* sleep 10ms */
 	}
 
 	scx200_acb_timeout(iface);

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors