From 000aa3a35a0346024da8aeb1ddd117a714ab1a98 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Sun, 3 Apr 2011 15:36:04 +0000 Subject: use nitems(); no binary change for drivers that are compiled on amd64. ok claudio@ --- sys/dev/pci/eap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/pci/eap.c') 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); -- cgit v1.2.3