summaryrefslogtreecommitdiff
path: root/sys/dev/pci/eap.c
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-04-03 15:36:04 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-04-03 15:36:04 +0000
commit000aa3a35a0346024da8aeb1ddd117a714ab1a98 (patch)
treee30c1afbb9ad547a742ef2e358c4067139433873 /sys/dev/pci/eap.c
parent445a93dfa951cfdb8d9253fd13836d6a25a4ac4b (diff)
use nitems(); no binary change for drivers that are compiled on amd64.
ok claudio@
Diffstat (limited to 'sys/dev/pci/eap.c')
-rw-r--r--sys/dev/pci/eap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index a528d4d2d01..2d4cb514683 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.41 2010/09/22 21:59:59 jakemsr Exp $ */
+/* $OpenBSD: eap.c,v 1.42 2011/04/03 15:36:02 jasper Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
@@ -288,7 +288,7 @@ int
eap_match(struct device *parent, void *match, void *aux)
{
return (pci_matchbyid((struct pci_attach_args *)aux, eap_devices,
- sizeof(eap_devices)/sizeof(eap_devices[0])));
+ nitems(eap_devices)));
}
int
@@ -799,7 +799,7 @@ eap_allocmem(struct eap_softc *sc, size_t size, size_t align, struct eap_dma *p)
p->size = size;
error = bus_dmamem_alloc(sc->sc_dmatag, p->size, align, 0,
- p->segs, sizeof(p->segs)/sizeof(p->segs[0]),
+ p->segs, nitems(p->segs),
&p->nsegs, BUS_DMA_NOWAIT);
if (error)
return (error);