Skip to contentSkip to conversation

drivers/scsi/dmx3191d.c: small cleanup patch (241p11)

PATCH New Rasmus Andersen 1 participant 1 message Jan 29, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/dmx3191d.c: small cleanup patch (241p11)

(Forgot l-k. Please cc [email protected] on replies to this mail.)

----- Forwarded message from Rasmus Andersen <[email protected]> -----

Hi.

The following patch makes drivers/scsi/dmx3191d.c call pci_enable_device before probing resources and replaces a check_region+request_region with request_region.

It applies against ac12 and 241p11.

Comments?

drivers/scsi/dmx3191d.c +3 -5
@@ -68,18 +68,16 @@
 	while ((pdev = pci_find_device(PCI_VENDOR_ID_DOMEX,
 			PCI_DEVICE_ID_DOMEX_DMX3191D, pdev))) {
 
-		unsigned long port = pci_resource_start (pdev, 0);
-
 		if (pci_enable_device(pdev))
 			continue;
 
-		if (check_region(port, DMX3191D_REGION)) {
+		unsigned long 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)
Signature · 19 lines
Regards,
        Rasmus([email protected])

"There are also enough rocks on Earth to kill the world's population several
times over."
	-- Lt. General Daniel Graham, DIA, explaining why it's necessary to
	   have more than enough nukes

----- End forwarded message -----

-- 
        Rasmus([email protected])

Even if you're on the right track, you'll get run over if you just sit there. 
  -- Will Rogers
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/