summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bnx.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_bnx.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_bnx.c')
-rw-r--r--sys/dev/pci/if_bnx.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index cc81227856f..479eaaaf899 100644
--- a/sys/dev/pci/if_bnx.c
+++ b/sys/dev/pci/if_bnx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnx.c,v 1.58 2008/02/28 02:02:43 brad Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.59 2008/05/23 08:49:27 brad Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -627,14 +627,8 @@ bnx_attach(struct device *parent, struct device *self, void *aux)
* Map control/status registers.
*/
memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, BNX_PCI_BAR0);
- 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, BNX_PCI_BAR0,
- memtype, 0, &sc->bnx_btag, &sc->bnx_bhandle,
- NULL, &sc->bnx_size, 0) == 0)
- break;
- default:
+ if (pci_mapreg_map(pa, BNX_PCI_BAR0, memtype, 0, &sc->bnx_btag,
+ &sc->bnx_bhandle, NULL, &sc->bnx_size, 0)) {
printf(": can't find mem space\n");
return;
}