i2c/i2c-ibm_iic: replace schedule_timeout() with
Subsystems (2)
Forgot the Signed-off-by: line, sorry.
Any comments would (still) be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Remove the unnecessary set_current_state() following the if, as schedule_timeout() [and thus, mlseep_interruptible()] is guaranteed to return in TASK_RUNNING.
drivers/i2c/busses/i2c-ibm_iic.c +1 -3
@@ -416,10 +416,8 @@ static int iic_wait_for_tc(struct ibm_iiinit_waitqueue_entry (&wait, current);add_wait_queue (&dev->wq, &wait); -set_current_state (TASK_INTERRUPTIBLE );if (in_8 (&iic->sts) &STS_PT ) -schedule_timeout (dev->adap.timeout *HZ ); -set_current_state (TASK_RUNNING ); +msleep_interruptible (dev->adap.timeout *1000 );remove_wait_queue (&dev->wq, &wait);if (unlikely (signal_pending (current))){
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Greg KH
AppliedQuoted 11 lines · Nishanth Aravamudan
Forgot the Signed-off-by: line, sorry.
Any comments would (still) be appreciated.
Description: Use
msleep_interruptible()instead ofschedule_timeout()to guarantee the task delays as expected. Remove the unnecessaryset_current_state()following the if, asschedule_timeout()[and thus,mlseep_interruptible()] is guaranteed to return inTASK_RUNNING.Signed-off-by Nishanth Aravamudan <[email protected]>
Applied, thanks.
greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors