patch-2.4.15 linux/drivers/scsi/aic7xxx/aic7xxx_linux_pci.c

Next file: linux/drivers/scsi/aic7xxx_old.c
Previous file: linux/drivers/scsi/aic7xxx/aic7xxx_linux.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/drivers/scsi/aic7xxx/aic7xxx_linux_pci.c linux/drivers/scsi/aic7xxx/aic7xxx_linux_pci.c
@@ -51,9 +51,11 @@
 					const struct pci_device_id *ent);
 static int	ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc,
 						u_long *base);
+#ifdef MMAPIO
 static int	ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
 						 u_long *bus_addr,
 						 uint8_t **maddr);
+#endif /* MMAPIO */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 static void	ahc_linux_pci_dev_remove(struct pci_dev *pdev);
 
@@ -89,7 +91,7 @@
 	 * the free directly, but check our
 	 * list for extra sanity.
 	 */
-	ahc = (struct ahc_softc *)pdev->driver_data;
+	ahc = pci_get_drvdata(pdev);
 	TAILQ_FOREACH(list_ahc, &ahc_tailq, links) {
 		if (list_ahc == ahc) {
 			ahc_free(ahc);
@@ -176,7 +178,7 @@
 		return (-error);
 	}
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
-	pdev->driver_data = ahc;
+	pci_set_drvdata(pdev, ahc);
 	if (aic7xxx_detect_complete)
 		ahc_linux_register_host(ahc, aic7xxx_driver_template);
 #endif
@@ -236,6 +238,7 @@
 	return (0);
 }
 
+#ifdef MMAPIO
 static int
 ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
 				 u_long *bus_addr,
@@ -274,6 +277,7 @@
 		error = ENOMEM;
 	return (error);
 }
+#endif /* MMAPIO */
 
 int
 ahc_pci_map_registers(struct ahc_softc *ahc)

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