summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_et.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-05-23 08:49:28 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-05-23 08:49:28 +0000
commitc58cbcf88e6e32a3776ac062709146b0a611e090 (patch)
tree297d755b4b24f534c9f0dc6baaa1204d858b4390 /sys/dev/pci/if_et.c
parent6947b86a8473a8a6d71156b7eb869fc7ad30e762 (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_et.c')
-rw-r--r--sys/dev/pci/if_et.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c
index 62ba18718ec..5b6ee5891d5 100644
--- a/sys/dev/pci/if_et.c
+++ b/sys/dev/pci/if_et.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_et.c,v 1.7 2008/02/08 04:42:05 brad Exp $ */
+/* $OpenBSD: if_et.c,v 1.8 2008/05/23 08:49:27 brad Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
@@ -206,14 +206,8 @@ et_attach(struct device *parent, struct device *self, void *aux)
sc->sc_timer = et_timer;
memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, ET_PCIR_BAR);
- 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, ET_PCIR_BAR, memtype, 0, &sc->sc_mem_bt,
- &sc->sc_mem_bh, NULL, &memsize, 0) == 0)
- break;
- /* FALLTHROUGH */
- default:
+ if (pci_mapreg_map(pa, ET_PCIR_BAR, memtype, 0, &sc->sc_mem_bt,
+ &sc->sc_mem_bh, NULL, &memsize, 0)) {
printf(": could not map mem space\n");
return;
}