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

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

diff -u --recursive --new-file v2.4.14/linux/drivers/usb/usb-ohci.c linux/drivers/usb/usb-ohci.c
@@ -2372,7 +2372,7 @@
 	ohci->regs = mem_base;   
 
 	ohci->ohci_dev = dev;
-	dev->driver_data = ohci;
+	pci_set_drvdata(dev, ohci);
  
 	INIT_LIST_HEAD (&ohci->ohci_hcd_list);
 	list_add (&ohci->ohci_hcd_list, &ohci_hcd_list);
@@ -2411,7 +2411,7 @@
 		free_irq (ohci->irq, ohci);
 		ohci->irq = -1;
 	}
-	ohci->ohci_dev->driver_data = 0;
+	pci_set_drvdata(ohci->ohci_dev, NULL);
 
 	usb_deregister_bus (ohci->bus);
 	usb_free_bus (ohci->bus);
@@ -2600,7 +2600,7 @@
 static void __devexit
 ohci_pci_remove (struct pci_dev *dev)
 {
-	ohci_t		*ohci = (ohci_t *) dev->driver_data;
+	ohci_t		*ohci = pci_get_drvdata(dev);
 
 	dbg ("remove %s controller usb-%s%s%s",
 		hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
@@ -2636,7 +2636,7 @@
 static int
 ohci_pci_suspend (struct pci_dev *dev, u32 state)
 {
-	ohci_t			*ohci = (ohci_t *) dev->driver_data;
+	ohci_t			*ohci = pci_get_drvdata(dev);
 	unsigned long		flags;
 	u16 cmd;
 
@@ -2715,7 +2715,7 @@
 static int
 ohci_pci_resume (struct pci_dev *dev)
 {
-	ohci_t		*ohci = (ohci_t *) dev->driver_data;
+	ohci_t		*ohci = pci_get_drvdata(dev);
 	int		temp;
 	unsigned long	flags;
 

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