summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-12-21 14:59:32 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-12-21 14:59:32 +0000
commita66c645dd88db48808d64b4a16666cf6f5d865e6 (patch)
tree22ba3e20ce5cc3706c1497541d72bfb17ddd8f22 /sys/dev
parent3bb259cfb64a837ed7f7ad51f776c711fdded5fe (diff)
Use the iomask in a correct way
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pcmcia/com_pcmcia.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/dev/pcmcia/com_pcmcia.c b/sys/dev/pcmcia/com_pcmcia.c
index 7864f7f6f7c..af5ac6cbc98 100644
--- a/sys/dev/pcmcia/com_pcmcia.c
+++ b/sys/dev/pcmcia/com_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_pcmcia.c,v 1.6 1998/12/21 09:56:07 niklas Exp $ */
+/* $OpenBSD: com_pcmcia.c,v 1.7 1998/12/21 14:59:31 niklas Exp $ */
/* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */
/*-
@@ -243,19 +243,11 @@ retry:
if (cfe->num_iospace != 1)
continue;
- if (autoalloc == 1) {
- if (cfe->iomask == 3) {
- if (!pcmcia_io_alloc(pa->pf, 0,
- cfe->iospace[0].length,
- cfe->iospace[0].length, &psc->sc_pcioh)) {
- goto found;
- }
- }
- } else {
- if (!pcmcia_io_alloc(pa->pf, cfe->iospace[0].start,
- cfe->iospace[0].length, 1, &psc->sc_pcioh)) {
- goto found;
- }
+ if (!pcmcia_io_alloc(pa->pf,
+ autoalloc ? cfe->iospace[0].start : 0,
+ cfe->iospace[0].length, (1 << cfe->iomask),
+ &psc->sc_pcioh)) {
+ goto found;
}
}
if (autoalloc == 0) {