-- 
Jeff Garzik      | Andre the Giant has a posse.
Building 1024    |
MandrakeSoft     |
diff -urN linux-2.4.6-pre5/drivers/usb/usb-ohci.c linux.pcipm/drivers/usb/usb-ohci.c
--- linux-2.4.6-pre5/drivers/usb/usb-ohci.c     Mon Jun 25 01:58:57 2001
+++ linux.pcipm/drivers/usb/usb-ohci.c  Wed Jun 27 15:06:37 2001
@@ -2585,15 +2585,15 @@
 
 /*-------------------------------------------------------------------------*/
 
-static void
-ohci_pci_suspend (struct pci_dev *dev)
+static int
+ohci_pci_suspend (struct pci_dev *dev, u32 state)
 {
        ohci_t          *ohci = (ohci_t *) dev->driver_data;
 
        if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER) {
                dbg ("can't suspend usb-%s (state is %s)", dev->slot_name,
                        hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS));
-               return;
+               return -EIO;
        }
 
        /* act as if usb suspend can always be used */
@@ -2605,11 +2605,13 @@
        ohci->hc_control = OHCI_USB_SUSPEND;
        writel (ohci->hc_control, &ohci->regs->control);
        wait_ms (10);
+
+       return 0;
 }
 
 /*-------------------------------------------------------------------------*/
 
-static void
+static int
 ohci_pci_resume (struct pci_dev *dev)
 {
        ohci_t          *ohci = (ohci_t *) dev->driver_data;
@@ -2620,7 +2622,7 @@
        if (atomic_read (&ohci->resume_count) != 1) {
                err ("concurrent PCI resumes for usb-%s", dev->slot_name);
                atomic_dec (&ohci->resume_count);
-               return;
+               return -EBUSY;
        }
 
        /* did we suspend, or were we powered off? */
@@ -2653,7 +2655,7 @@
                if (temp != OHCI_USB_RESUME) {
                        err ("controller usb-%s won't resume", dev->slot_name);
                        ohci->disabled = 1;
-                       return;
+                       return -EIO;
                }
 
                ohci->disabled = 0;
@@ -2676,6 +2678,8 @@
 
        /* controller is operational, extra resumes are harmless */
        atomic_dec (&ohci->resume_count);
+
+       return 0;
 }
 
 #endif /* CONFIG_PM */
diff -urN linux-2.4.6-pre5/drivers/usb/usb-uhci.c linux.pcipm/drivers/usb/usb-uhci.c
--- linux-2.4.6-pre5/drivers/usb/usb-uhci.c     Mon Jun 25 01:58:57 2001
+++ linux.pcipm/drivers/usb/usb-uhci.c  Wed Jun 27 15:06:58 2001
@@ -2897,16 +2897,18 @@
 }
 
 #ifdef CONFIG_PM
-_static void
-uhci_pci_suspend (struct pci_dev *dev)
+_static int
+uhci_pci_suspend (struct pci_dev *dev, u32 state)
 {
        reset_hc((uhci_t *) dev->driver_data);
+       return 0;
 }
 
-_static void
+_static int
 uhci_pci_resume (struct pci_dev *dev)
 {
        start_hc((uhci_t *) dev->driver_data);
+       return 0;
 }
 #endif
 

Reply via email to