summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/isa.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-09-01 06:34:24 +0000
committerpeter <peter@FreeBSD.org>1999-09-01 06:34:24 +0000
commite9c6949f3868395659b408269ec49102b489522f (patch)
tree6e9d6526da47c13577c1b295a5a38d82345e9e4e /sys/i386/isa/isa.c
parent3dd8d232496a86cd284e7d72e7229f3d567a460d (diff)
downloadFreeBSD-src-e9c6949f3868395659b408269ec49102b489522f.zip
FreeBSD-src-e9c6949f3868395659b408269ec49102b489522f.tar.gz
Eliminate some magic numbers.
Diffstat (limited to 'sys/i386/isa/isa.c')
-rw-r--r--sys/i386/isa/isa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index f87d981..da65528 100644
--- a/sys/i386/isa/isa.c
+++ b/sys/i386/isa/isa.c
@@ -104,13 +104,13 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
if (!rle) {
if (*rid < 0)
return 0;
- if (type == SYS_RES_IRQ && *rid > 1)
+ if (type == SYS_RES_IRQ && *rid >= ISA_NIRQ)
return 0;
- if (type == SYS_RES_DRQ && *rid > 1)
+ if (type == SYS_RES_DRQ && *rid >= ISA_NDRQ)
return 0;
- if (type != SYS_RES_MEMORY && *rid > 3)
+ if (type != SYS_RES_MEMORY && *rid >= ISA_NMEM)
return 0;
- if (type == SYS_RES_IOPORT && *rid > 7)
+ if (type == SYS_RES_IOPORT && *rid >= ISA_NPORT)
return 0;
resource_list_add(rl, type, *rid, start, end, count);
}
OpenPOWER on IntegriCloud