patch-2.4.0-test2 linux/drivers/isdn/hisax/elsa.c

Next file: linux/drivers/isdn/hisax/gazel.c
Previous file: linux/drivers/isdn/hisax/diva.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/isdn/hisax/elsa.c linux/drivers/isdn/hisax/elsa.c
@@ -1058,20 +1058,20 @@
 		cs->subtyp = 0;
 		if ((dev_qs1000 = pci_find_device(PCI_VENDOR_ELSA, PCI_QS1000_ID,
 			 dev_qs1000))) {
-				cs->subtyp = ELSA_QS1000PCI;
+			if (pci_enable_device(dev_qs1000))
+				return (0);
+			cs->subtyp = ELSA_QS1000PCI;
 			cs->irq = dev_qs1000->irq;
-			cs->hw.elsa.cfg = dev_qs1000->resource[ 1].start & 
-				PCI_BASE_ADDRESS_IO_MASK;
-			cs->hw.elsa.base = dev_qs1000->resource[ 3].start & 
-				PCI_BASE_ADDRESS_IO_MASK;
+			cs->hw.elsa.cfg = pci_resource_start(dev_qs1000, 1);
+			cs->hw.elsa.base = pci_resource_start(dev_qs1000, 3);
 		} else if ((dev_qs3000 = pci_find_device(PCI_VENDOR_ELSA,
 			PCI_QS3000_ID, dev_qs3000))) {
+			if (pci_enable_device(dev_qs1000))
+				return (0);
 			cs->subtyp = ELSA_QS3000PCI;
 			cs->irq = dev_qs3000->irq;
-			cs->hw.elsa.cfg = dev_qs3000->resource[ 1].start & 
-				PCI_BASE_ADDRESS_IO_MASK;
-			cs->hw.elsa.base = dev_qs3000->resource[ 3].start & 
-				PCI_BASE_ADDRESS_IO_MASK;
+			cs->hw.elsa.cfg = pci_resource_start(dev_qs3000, 1);
+			cs->hw.elsa.base = pci_resource_start(dev_qs3000, 3);
 		} else {
 			printk(KERN_WARNING "Elsa: No PCI card found\n");
 			return(0);

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