diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pcmcia/com_pcmcia.c | 20 |
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) { |