Skip to contentSkip to conversation

pci/quirks: replace schedule_timeout() with msleep()

PATCH Applied Nishanth Aravamudan 2 participants 2 messages Oct 22, 2004 – Oct 24, 2004

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

PATCH 1/1 pci/quirks: replace schedule_timeout() with msleep()

Any comments would be, as always, appreciated.

-Nish

Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected.

drivers/pci/quirks.c +2 -4
@@ -938,8 +938,7 @@ static void __devinit quirk_usb_handoff_
 		while (wait_time > 0 && 
 				readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
 			wait_time -= 10;
-			set_current_state(TASK_UNINTERRUPTIBLE);
-			schedule_timeout((HZ*10 + 999) / 1000);
+			msleep(10);
 		}
 	}
 
@@ -988,8 +987,7 @@ static void __devinit quirk_usb_disable_
 
 			wait_time = 500;
 			do {
-				set_current_state(TASK_UNINTERRUPTIBLE);
-				schedule_timeout((HZ*10+999)/1000);
+				msleep(10);
 				wait_time -= 10;
 				pci_read_config_dword(pdev,
 						hcc_params + EHCI_USBLEGSUP,

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

#1 lore raw
Quoted 9 lines · Nishanth Aravamudan

Any comments would be, as always, appreciated.

-Nish

Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected.

applied to kjt,
to get further testing and to be shure it gets upstream.

thanks

--
maks
kernel janitor http://janitor.kernelnewbies.org/

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