ChangeSet 1.1748, 2004/05/18 15:58:57-07:00, greg@kroah.com

USB: remove ehci and ohci's private sleep function and use msleep() instead.


 drivers/usb/host/ehci-hcd.c |    4 ++--
 drivers/usb/host/ehci.h     |    6 ------
 drivers/usb/host/ohci-hcd.c |    4 ++--
 drivers/usb/host/ohci-hub.c |    4 ++--
 drivers/usb/host/ohci-pci.c |    6 +++---
 drivers/usb/host/ohci.h     |    6 ------
 6 files changed, 9 insertions(+), 21 deletions(-)


diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c	Tue May 18 17:05:22 2004
+++ b/drivers/usb/host/ehci-hcd.c	Tue May 18 17:05:22 2004
@@ -632,7 +632,7 @@
 	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
 
 	while (time_before (jiffies, ehci->next_statechange))
-		msec_delay (100);
+		msleep (100);
 
 #ifdef	CONFIG_USB_SUSPEND
 	(void) usb_suspend_device (hcd->self.root_hub);
@@ -654,7 +654,7 @@
 	// maybe restore (PCI) FLADJ
 
 	while (time_before (jiffies, ehci->next_statechange))
-		msec_delay (100);
+		msleep (100);
 
 #ifdef	CONFIG_USB_SUSPEND
 	retval = usb_resume_device (hcd->self.root_hub);
diff -Nru a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
--- a/drivers/usb/host/ehci.h	Tue May 18 17:05:22 2004
+++ b/drivers/usb/host/ehci.h	Tue May 18 17:05:22 2004
@@ -596,12 +596,6 @@
 
 /*-------------------------------------------------------------------------*/
 
-static inline void msec_delay(unsigned msec)
-{
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(msecs_to_jiffies(msec));
-}
-
 #ifndef DEBUG
 #define STUB_DEBUG_FILES
 #endif	/* DEBUG */
diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c	Tue May 18 17:05:22 2004
+++ b/drivers/usb/host/ohci-hcd.c	Tue May 18 17:05:22 2004
@@ -417,7 +417,7 @@
 		writel (OHCI_INTR_OC, &ohci->regs->intrenable);
 		writel (OHCI_OCR, &ohci->regs->cmdstatus);
 		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
-			msec_delay (10);
+			msleep (10);
 			if (--temp == 0) {
 				ohci_err (ohci, "USB HC TakeOver failed!\n");
 				return -1;
@@ -451,7 +451,7 @@
 	}
 	// flush those pci writes
 	(void) readl (&ohci->regs->control);
-	msec_delay (50);
+	msleep (50);
 
 	/* HC Reset requires max 10 us delay */
 	writel (OHCI_HCR,  &ohci->regs->cmdstatus);
diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
--- a/drivers/usb/host/ohci-hub.c	Tue May 18 17:05:22 2004
+++ b/drivers/usb/host/ohci-hub.c	Tue May 18 17:05:22 2004
@@ -248,7 +248,7 @@
 	/* Then re-enable operations */
 	writel (OHCI_USB_OPER, &ohci->regs->control);
 	(void) readl (&ohci->regs->control);
-	msec_delay (3);
+	msleep (3);
 
 	temp = OHCI_CONTROL_INIT | OHCI_USB_OPER;
 	if (ohci->hcd.can_wakeup)
@@ -258,7 +258,7 @@
 	(void) readl (&ohci->regs->control);
 
 	/* TRSMRCY */
-	msec_delay (10);
+	msleep (10);
 	root->dev.power.power_state = 0;
 
 	/* keep it alive for ~5x suspend + resume costs */
diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
--- a/drivers/usb/host/ohci-pci.c	Tue May 18 17:05:22 2004
+++ b/drivers/usb/host/ohci-pci.c	Tue May 18 17:05:22 2004
@@ -122,7 +122,7 @@
 
 	/* suspend root hub, hoping it keeps power during suspend */
 	while (time_before (jiffies, ohci->next_statechange))
-		msec_delay (100);
+		msleep (100);
 
 #ifdef	CONFIG_USB_SUSPEND
 	(void) usb_suspend_device (hcd->self.root_hub);
@@ -133,7 +133,7 @@
 #endif
 
 	/* let things settle down a bit */
-	msec_delay (100);
+	msleep (100);
 	
 #ifdef CONFIG_PMAC_PBOOK
 	if (_machine == _MACH_Pmac)
@@ -170,7 +170,7 @@
 
 	/* resume root hub */
 	while (time_before (jiffies, ohci->next_statechange))
-		msec_delay (100);
+		msleep (100);
 #ifdef	CONFIG_USB_SUSPEND
 	/* get extra cleanup even if remote wakeup isn't in use */
 	retval = usb_resume_device (hcd->self.root_hub);
diff -Nru a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
--- a/drivers/usb/host/ohci.h	Tue May 18 17:05:22 2004
+++ b/drivers/usb/host/ohci.h	Tue May 18 17:05:22 2004
@@ -397,12 +397,6 @@
 	ohci->hcd.state = USB_STATE_HALT;
 }
 
-static inline void msec_delay(unsigned msec)
-{
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout(msecs_to_jiffies(msec));
-}
-
 #define	FI			0x2edf		/* 12000 bits per frame (-1) */
 #define	DEFAULT_FMINTERVAL 	((((6 * (FI - 210)) / 7) << 16) | FI)
 #define LSTHRESH		0x628		/* lowspeed bit threshold */
