polling loops: change exit condition to
Subsystems (2)
PATCH 18/21 polling loops: change exit condition to
UltraSPARC (sparc64):
P: David S. Miller
M: [email protected]
P: Eddie C. Dost
M: [email protected]
P: Jakub Jelinek
M: [email protected]
P: Anton Blanchard
M: [email protected]
Signed-off-by Marcin Slusarz <[email protected]>
drivers/sbus/char/bbc_i2c.c +3 -2
@@ -181,12 +181,13 @@ void bbc_i2c_detach(struct bbc_i2c_clienstatic int wait_for_pin (struct bbc_i2c_bus *bp,u8 *status) {DECLARE_WAITQUEUE (wait, current); -int limit =32 ;int ret =1 ; +unsigned long end_time; bp->waiting =1 ;add_wait_queue (&bp->wq, &wait); -while (limit-- >0 ) { + end_time = jiffies +msecs_to_jiffies (32 *250 ); +while (time_before (jiffies, end_time)) {u8 val;set_current_state (TASK_INTERRUPTIBLE );
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors