diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2005-05-02 11:30:26 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2005-05-02 11:30:26 +0000 |
commit | 7bbb8f0c68bc240ad5e99691d91ae67876a09706 (patch) | |
tree | ec4064de7936ff97ae40aeaab5aea4d311f4bb5b /sys/dev | |
parent | 94f45d04c266c650a5c6ccfbd80615394c5f7e09 (diff) |
Don't hardcode sizeof(pcireg_t) value. ok markus@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 5 |
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; |