]> git.hungrycats.org Git - linux/commitdiff
Clean up check_region() usage. It is deprecated in 2.5.X and 2.4.X,
authorJustin T. Gibbs <gibbs@overdrive.btc.adaptec.com>
Mon, 30 Dec 2002 11:54:22 +0000 (04:54 -0700)
committerJustin T. Gibbs <gibbs@overdrive.btc.adaptec.com>
Mon, 30 Dec 2002 11:54:22 +0000 (04:54 -0700)
but is still required in earlier kernels.

drivers/scsi/aic7xxx/aic7770_osm.c
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c

index 80d25528e95ce0f9c2b5c331566e8afdd87844d8..0646072850b9ac4412e79caf0241637e65a24dff 100644 (file)
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7770_osm.c#11 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7770_osm.c#12 $
  */
 
 #include "aic7xxx_osm.h"
@@ -61,8 +61,14 @@ aic7770_linux_probe(Scsi_Host_Template *template)
                uint32_t eisa_id;
                size_t   id_size;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
                if (check_region(eisaBase, AHC_EISA_IOSIZE) != 0)
                        continue;
+               request_region(eisaBase, AHC_EISA_IOSIZE, "aic7xxx");
+#else
+               if (request_region(eisaBase, AHC_EISA_IOSIZE, "aic7xxx") != 0)
+                       continue;
+#endif
 
                eisa_id = 0;
                id_size = sizeof(eisa_id);
@@ -72,6 +78,7 @@ aic7770_linux_probe(Scsi_Host_Template *template)
                        eisa_id |= inb(eisaBase + IDOFFSET + i)
                                   << ((id_size-i-1) * 8);
                }
+               release_region(eisaBase, AHC_EISA_IOSIZE);
                if (eisa_id & 0x80000000)
                        continue;  /* no EISA card in slot */
 
index fe598eba390d273657bb1f1f1d5be8904d9bbeee..115fcbf89e658d12108030061a22ef32fdc9b312 100644 (file)
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#18 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#19 $
  */
 
 #include "aic79xx_osm.h"
@@ -240,10 +240,8 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base,
        if (check_region(*base, 256) != 0
         || check_region(*base2, 256) != 0)
                return (ENOMEM);
-       else {
-               request_region(*base, 256, "aic79xx");
-               request_region(*base2, 256, "aic79xx");
-       }
+       request_region(*base, 256, "aic79xx");
+       request_region(*base2, 256, "aic79xx");
 #else
        if (request_region(*base, 256, "aic79xx") == 0)
                return (ENOMEM);
index 495367b66a6d44e7dc98fc6755483e935dd4e0d0..38f93a4055349ff790a9d453bdd7d9af803fd277 100644 (file)
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#41 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#42 $
  */
 
 #include "aic7xxx_osm.h"
@@ -229,8 +229,7 @@ ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, u_long *base)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
        if (check_region(*base, 256) != 0)
                return (ENOMEM);
-       else
-               request_region(*base, 256, "aic7xxx");
+       request_region(*base, 256, "aic7xxx");
 #else
        if (request_region(*base, 256, "aic7xxx") == 0)
                return (ENOMEM);