patch-2.4.0-test2 linux/drivers/atm/eni.c
Next file: linux/drivers/atm/fore200e.c
Previous file: linux/drivers/atm/atmtcp.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Tue Jun 20 13:58:42 2000
- Orig file:
v2.4.0-test1/linux/drivers/atm/eni.c
- Orig date:
Tue May 23 15:31:34 2000
diff -u --recursive --new-file v2.4.0-test1/linux/drivers/atm/eni.c linux/drivers/atm/eni.c
@@ -1711,7 +1711,7 @@
dev->link_rate = ATM_OC3_PCR;
eni_dev = ENI_DEV(dev);
pci_dev = eni_dev->pci_dev;
- real_base = pci_dev->resource[0].start;
+ real_base = pci_resource_start(pci_dev, 0);
eni_dev->irq = pci_dev->irq;
error = pci_read_config_byte(pci_dev,PCI_REVISION_ID,&revision);
if (error) {
@@ -2246,8 +2246,16 @@
int error = -ENOMEM;
DPRINTK("eni_init_one\n");
+
+ MOD_INC_USE_COUNT; /* @@@ we don't support unloading yet */
+
+ if (pci_enable_device(pci_dev)) {
+ error = -EIO;
+ goto out0;
+ }
+
eni_dev = (struct eni_dev *) kmalloc(sizeof(struct eni_dev),GFP_KERNEL);
- if (!eni_dev) return -ENOMEM;
+ if (!eni_dev) goto out0;
if (!cpu_zeroes) {
cpu_zeroes = pci_alloc_consistent(pci_dev,ENI_ZEROES_SIZE,
&zeroes);
@@ -2265,7 +2273,6 @@
if (error) goto out3;
eni_dev->more = eni_boards;
eni_boards = dev;
- MOD_INC_USE_COUNT; /* @@@ we don't support unloading yet */
return 0;
out3:
atm_dev_deregister(dev);
@@ -2274,6 +2281,8 @@
cpu_zeroes = NULL;
out1:
kfree(eni_dev);
+out0:
+ MOD_DEC_USE_COUNT; /* @@@ we don't support unloading yet */
return error;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)