Commit e409b3d0 authored by Justin T. Gibbs's avatar Justin T. Gibbs

Clean up check_region() usage. It is deprecated in 2.5.X and 2.4.X,

but is still required in earlier kernels.
parent bffa781b
......@@ -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 */
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment