]> git.hungrycats.org Git - linux/commitdiff
[PATCH] 2.5.56, ne2k compiles and works
authorMartin H. VanLeeuwen <vanl@megsinet.net>
Sun, 12 Jan 2003 03:43:08 +0000 (19:43 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 12 Jan 2003 03:43:08 +0000 (19:43 -0800)
This patch makes the ne.c compile and ISA pnp ne2k work after
changes in 2.5.54 for PNP broke it.

 a. use pnp_dev instead of pci_dev
 b. convert to appropriate pnp_*()'s
 c. check -1 instead of 0 for invalid IRQ

drivers/net/ne.c

index 9f38a51949e58fac68a3707e6393f6928f0e4409..4f2b7776a72a2c95f904525d9a6ad41616d91763 100644 (file)
@@ -196,23 +196,21 @@ static int __init ne_probe_isapnp(struct net_device *dev)
        int i;
 
        for (i = 0; isapnp_clone_list[i].vendor != 0; i++) {
-               struct pci_dev *idev = NULL;
+               struct pnp_dev *idev = NULL;
 
-               while ((idev = isapnp_find_dev(NULL,
+               while ((idev = pnp_find_dev(NULL,
                                               isapnp_clone_list[i].vendor,
                                               isapnp_clone_list[i].function,
                                               idev))) {
                        /* Avoid already found cards from previous calls */
-                       if (idev->prepare(idev))
-                               continue;
-                       if (idev->activate(idev))
+                       if (pnp_activate_dev(idev, NULL))
                                continue;
                        /* if no irq, search for next */
-                       if (idev->irq_resource[0].start == 0)
+                       if (pnp_irq(idev, 0) == -1)
                                continue;
                        /* found it */
-                       dev->base_addr = idev->resource[0].start;
-                       dev->irq = idev->irq_resource[0].start;
+                       dev->base_addr = pnp_port_start(idev, 0);
+                       dev->irq = pnp_irq(idev, 0);
                        printk(KERN_INFO "ne.c: ISAPnP reports %s at i/o %#lx, irq %d.\n",
                                (char *) isapnp_clone_list[i].driver_data,