summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index c2115e2c48e..8d6e4b9e587 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.c,v 1.36 2004/12/08 15:38:41 markus Exp $ */
+/* $OpenBSD: pci.c,v 1.37 2005/05/02 11:30:25 grange Exp $ */
/* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */
/*
@@ -58,7 +58,8 @@ struct pci_softc {
#endif
};
-#define NMAPREG ((PCI_MAPREG_END - PCI_MAPREG_START) / 4)
+#define NMAPREG ((PCI_MAPREG_END - PCI_MAPREG_START) / \
+ sizeof(pcireg_t))
struct pci_dev {
LIST_ENTRY(pci_dev) pd_next;
struct device *pd_dev;