From 6ea0ab26e2adb4bfc4ef29d9302ecd23fa445396 Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 15 Apr 1998 01:53:47 +0000 Subject: Don't reference functions defined in isadma.c if we don't have to, since we might not have any ISA DMA-using devices configured, thus isadma.c won't be compiled. Fixes a problem reported by Kevin Lahey. Also, since there are only 8 DMA channels, don't bother checking DRQs 8 - 15. --- sys/dev/isapnp/isapnp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/isapnp/isapnp.c b/sys/dev/isapnp/isapnp.c index cab9eff5dd5..eeb1e75b89b 100644 --- a/sys/dev/isapnp/isapnp.c +++ b/sys/dev/isapnp/isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: isapnp.c,v 1.15 1998/01/12 09:27:14 thorpej Exp $ */ +/* $NetBSD: isapnp.c,v 1.16 1998/04/15 01:53:47 thorpej Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -258,8 +258,8 @@ isapnp_alloc_drq(isa, i) return 0; } - for (b = 0; b < 16; b++) - if ((i->bits & (1 << b)) && isa_drq_isfree(isa, b)) { + for (b = 0; b < 7; b++) + if ((i->bits & (1 << b)) && ISA_DRQ_ISFREE(isa, b)) { i->num = b; return 0; } -- cgit