patch-2.4.3 linux/drivers/scsi/dmx3191d.c

Next file: linux/drivers/scsi/g_NCR5380.c
Previous file: linux/drivers/scsi/cyberstormII.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/drivers/scsi/dmx3191d.c linux/drivers/scsi/dmx3191d.c
@@ -68,18 +68,17 @@
 	while ((pdev = pci_find_device(PCI_VENDOR_ID_DOMEX,
 			PCI_DEVICE_ID_DOMEX_DMX3191D, pdev))) {
 
-		unsigned long port = pci_resource_start (pdev, 0);
-
+		unsigned long port;
 		if (pci_enable_device(pdev))
 			continue;
 
-		if (check_region(port, DMX3191D_REGION)) {
+		port = pci_resource_start (pdev, 0);
+		
+		if (!request_region(port, DMX3191D_REGION, DMX3191D_DRIVER_NAME)) {
 			dmx3191d_printk("region 0x%lx-0x%lx already reserved\n",
 				port, port + DMX3191D_REGION);
 			continue;
 		}
-
-		request_region(port, DMX3191D_REGION, DMX3191D_DRIVER_NAME);
 
 		instance = scsi_register(tmpl, sizeof(struct NCR5380_hostdata));
 		if(instance == NULL)

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