From: Gene Heskett <gene.heskett@verizon.net>

Use request_region() rather than check_region().  Gene has been running this
for months.


---

 25-akpm/drivers/scsi/advansys.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -puN drivers/scsi/advansys.c~advansys-fix drivers/scsi/advansys.c
--- 25/drivers/scsi/advansys.c~advansys-fix	2004-04-06 09:13:34.819554752 -0700
+++ 25-akpm/drivers/scsi/advansys.c	2004-04-06 09:13:34.837552016 -0700
@@ -4619,7 +4619,7 @@ advansys_detect(Scsi_Host_Template *tpnt
                         ASC_DBG1(1,
                                 "advansys_detect: probing I/O port 0x%x...\n",
                             iop);
-                        if (check_region(iop, ASC_IOADR_GAP) != 0) {
+                        if (!request_region(iop, ASC_IOADR_GAP,"advansys")) {
                             printk(
 "AdvanSys SCSI: specified I/O Port 0x%X is busy\n", iop);
                             /* Don't try this I/O port twice. */
@@ -4630,6 +4630,7 @@ advansys_detect(Scsi_Host_Template *tpnt
 "AdvanSys SCSI: specified I/O Port 0x%X has no adapter\n", iop);
                             /* Don't try this I/O port twice. */
                             asc_ioport[ioport] = 0;
+			    release_region(iop, ASC_IOADR_GAP);
                             goto ioport_try_again;
                         } else {
                             /*
@@ -4647,6 +4648,7 @@ advansys_detect(Scsi_Host_Template *tpnt
                                   * 'ioport' past this board.
                                   */
                                  ioport++;
+				 release_region(iop,ASC_IOADR_GAP);
                                  goto ioport_try_again;
                             }
                         }
@@ -10003,9 +10005,9 @@ AscSearchIOPortAddr11(
     }
     for (; i < ASC_IOADR_TABLE_MAX_IX; i++) {
         iop_base = _asc_def_iop_base[i];
-        if (check_region(iop_base, ASC_IOADR_GAP) != 0) {
+        if (!request_region(iop_base, ASC_IOADR_GAP, "advansys")) {
             ASC_DBG1(1,
-               "AscSearchIOPortAddr11: check_region() failed I/O port 0x%x\n",
+               "AscSearchIOPortAddr11: request_region() failed I/O port 0x%x\n",
                      iop_base);
             continue;
         }

_