]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] [PATCH 2.6.0-test1] remove check_region from drivers_net_3c509.c
authorRusty Russell <trivial@rustcorp.com.au>
Thu, 25 Sep 2003 16:57:16 +0000 (12:57 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 25 Sep 2003 16:57:16 +0000 (12:57 -0400)
From:  Domen Puncer <root@coderock.org>

drivers/net/3c509.c

index 74fd4100332bfd1375596d61d56116bea58022ea..7108ff0bf2087866a6cb7f3f09bf8cfaa5b78171 100644 (file)
@@ -382,9 +382,7 @@ static int __init el3_probe(int card_idx)
 #if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
        static int pnp_cards;
        struct pnp_dev *idev = NULL;
-#endif /* __ISAPNP__ */
 
-#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
        if (nopnp == 1)
                goto no_pnp;
 
@@ -440,12 +438,15 @@ no_pnp:
 #else
        /* Select an open I/O location at 0x1*0 to do contention select. */
        for ( ; id_port < 0x200; id_port += 0x10) {
-               if (check_region(id_port, 1))
+               if (!request_region(id_port, 1, "3c509"))
                        continue;
                outb(0x00, id_port);
                outb(0xff, id_port);
-               if (inb(id_port) & 0x01)
+               if (inb(id_port) & 0x01){
+                       release_region(id_port, 1);
                        break;
+               } else
+                       release_region(id_port, 1);
        }
        if (id_port >= 0x200) {
                /* Rare -- do we really need a warning? */