patch-2.4.0-test2 linux/drivers/net/sk98lin/skge.c
Next file: linux/drivers/net/sk_g16.c
Previous file: linux/drivers/net/sis900.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Mon Jun 19 13:42:38 2000
- Orig file:
v2.4.0-test1/linux/drivers/net/sk98lin/skge.c
- Orig date:
Tue Apr 11 15:09:17 2000
diff -u --recursive --new-file v2.4.0-test1/linux/drivers/net/sk98lin/skge.c linux/drivers/net/sk98lin/skge.c
@@ -369,24 +369,18 @@
if (!pci_present()) /* is PCI support present? */
return -ENODEV;
- while((pdev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET << 8, pdev)))
- {
- dev = NULL;
-
- if (pdev->vendor != PCI_VENDOR_ID_SYSKONNECT ||
- pdev->device != PCI_DEVICE_ID_SYSKONNECT_GE) {
+ while((pdev = pci_find_device(PCI_VENDOR_ID_SYSKONNECT,
+ PCI_DEVICE_ID_SYSKONNECT_GE, pdev)) != NULL) {
+ if (pci_enable_device(pdev))
continue;
- }
dev = init_etherdev(dev, sizeof(SK_AC));
- if (dev == NULL || dev->priv == NULL){
+ if (dev == NULL) {
printk(KERN_ERR "Unable to allocate etherdev "
"structure!\n");
break;
}
- memset(dev->priv, 0, sizeof(SK_AC));
-
pAC = dev->priv;
pAC->PciDev = *pdev;
pAC->PciDevId = pdev->device;
@@ -412,7 +406,7 @@
pci_set_master(pdev);
- base_address = pdev->resource[0].start;
+ base_address = pci_resource_start (pdev, 0);
#ifdef SK_BIG_ENDIAN
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)