diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-05-23 08:49:28 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-05-23 08:49:28 +0000 |
commit | c58cbcf88e6e32a3776ac062709146b0a611e090 (patch) | |
tree | 297d755b4b24f534c9f0dc6baaa1204d858b4390 /sys/dev/pci/if_lge.c | |
parent | 6947b86a8473a8a6d71156b7eb869fc7ad30e762 (diff) |
Simplify the combination use of pci_mapreg_type()/pci_mapreg_map() as
suggested by dlg@ awhile ago.
ok dlg@
Diffstat (limited to 'sys/dev/pci/if_lge.c')
-rw-r--r-- | sys/dev/pci/if_lge.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index 2050448e419..cc9913b55f6 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.46 2007/11/26 09:28:33 martynas Exp $ */ +/* $OpenBSD: if_lge.c,v 1.47 2008/05/23 08:49:27 brad Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -456,14 +456,8 @@ lge_attach(struct device *parent, struct device *self, void *aux) } #else memtype = pci_mapreg_type(pc, pa->pa_tag, LGE_PCI_LOMEM); - switch (memtype) { - case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT: - case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT: - if (pci_mapreg_map(pa, LGE_PCI_LOMEM, - memtype, 0, &sc->lge_btag, &sc->lge_bhandle, - NULL, &size, 0) == 0) - break; - default: + if (pci_mapreg_map(pa, LGE_PCI_LOMEM, memtype, 0, &sc->lge_btag, + &sc->lge_bhandle, NULL, &size, 0)) { printf(": can't map mem space\n"); return; } |