summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-06-03 17:14:22 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-06-03 17:14:22 +0000
commitf85e7f6f471cf857331d4b96043121305d4db1a1 (patch)
tree6ceaa15198ad1fe1a0bb9a52a5a6dd37422574ca /sys
parent4af9874148b61feb347eb59c1200da38653576c1 (diff)
Simplify the use of pci_mapreg_map().
ok oga@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/vga_pci.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index b6fcceaa91e..4073892d490 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_pci.c,v 1.31 2008/05/06 19:19:02 oga Exp $ */
+/* $OpenBSD: vga_pci.c,v 1.32 2008/06/03 17:14:21 brad Exp $ */
/* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */
/*
@@ -448,14 +448,9 @@ vga_pci_bar_map(struct vga_pci_softc *dev, int addr, bus_size_t size,
}
if (bar->mapped == 0) {
- switch (bar->maptype) {
- case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT:
- case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT:
- if (pci_mapreg_map(&dev->pa, bar->addr, bar->maptype,
- bar->flags | busflags, &bar->bst, &bar->bsh, NULL,
- &bar->size, size) == 0)
- break;
- default:
+ if (pci_mapreg_map(&dev->pa, bar->addr, bar->maptype,
+ bar->flags | busflags, &bar->bst, &bar->bsh, NULL,
+ &bar->size, size)) {
printf("vga_pci_bar_map: can't map bar 0x%x\n", addr);
return (NULL);
}