patch-2.4.6 linux/drivers/usb/usb-ohci.c

Next file: linux/drivers/usb/usb-ohci.h
Previous file: linux/drivers/usb/uhci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/drivers/usb/usb-ohci.c linux/drivers/usb/usb-ohci.c
@@ -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 */
@@ -2774,8 +2778,7 @@
 #ifdef CONFIG_PMAC_PBOOK
 	pmu_register_sleep_notifier (&ohci_sleep_notifier);
 #endif  
-	info(DRIVER_VERSION " " DRIVER_AUTHOR);
-	info(DRIVER_DESC);
+	info(DRIVER_VERSION ":" DRIVER_DESC);
 	return ret;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)