patch-2.4.15 linux/drivers/usb/uhci.c

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

diff -u --recursive --new-file v2.4.14/linux/drivers/usb/uhci.c linux/drivers/usb/uhci.c
@@ -2623,7 +2623,7 @@
 	uhci->dev = dev;
 	uhci->io_addr = io_addr;
 	uhci->io_size = io_size;
-	dev->driver_data = uhci;
+	pci_set_drvdata(dev, uhci);
 
 #ifdef CONFIG_PROC_FS
 	uhci->num = uhci_num++;
@@ -2931,7 +2931,7 @@
 
 static void __devexit uhci_pci_remove(struct pci_dev *dev)
 {
-	struct uhci *uhci = dev->driver_data;
+	struct uhci *uhci = pci_get_drvdata(dev);
 
 	if (uhci->bus->root_hub)
 		usb_disconnect(&uhci->bus->root_hub);
@@ -2956,14 +2956,14 @@
 #ifdef CONFIG_PM
 static int uhci_pci_suspend(struct pci_dev *dev, u32 state)
 {
-	suspend_hc((struct uhci *) dev->driver_data);
+	suspend_hc((struct uhci *) pci_get_drvdata(dev));
 	return 0;
 }
 
 static int uhci_pci_resume(struct pci_dev *dev)
 {
-	reset_hc((struct uhci *) dev->driver_data);
-	start_hc((struct uhci *) dev->driver_data);
+	reset_hc((struct uhci *) pci_get_drvdata(dev));
+	start_hc((struct uhci *) pci_get_drvdata(dev));
 	return 0;
 }
 #endif

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