net/islpci_dev: replace schedule_timeout() with msleep()
Subsystems (3)
PATCH 7/18 net/islpci_dev: replace schedule_timeout() with msleep()
Any comments would be appreciated.
Description: Use msleep() instead of schedule_timeout()
to guarantee the task delays as expected. Also set_current_state() is inserted before schedule_timeout(). If the for-loop were to execute twice, the second time would not set the state before sleeping in the current code; this causes schedule_timeout() to return immediately.
Signed-off-by Nishanth Aravamudan <[email protected]>
Signed-off-by Maximilian Attems <[email protected]>
---
linux-2.6.10-rc1-max/drivers/net/wireless/prism54/islpci_dev.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/prism54/islpci_dev.c renamed from drivers/net/wireless/prism54/islpci_dev.c~msleep-drivers_net_wireless_prism54_islpci_dev +1 -2
@@ -438,8 +438,7 @@ prism54_bring_down(islpci_private *priv)wmb ();/* wait a while for the device to reset */ -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (50 *HZ /1000 ); +msleep (50 );return 0 ; }
_