From e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 19 Apr 2016 23:37:24 +0000 Subject: sys/dev: use our nitems() macro when it is avaliable through param.h. No functional change, only trivial cases are done in this sweep, Drivers that can get further enhancements will be done independently. Discussed in: freebsd-current --- sys/dev/hatm/if_hatm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/hatm') diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c index 0677a14..d1dd6b1 100644 --- a/sys/dev/hatm/if_hatm.c +++ b/sys/dev/hatm/if_hatm.c @@ -608,7 +608,7 @@ hatm_read_prom_byte(struct hatm_softc *sc, u_int addr) BARRIER_W(sc); /* send READ */ - for (i = 0; i < sizeof(readtab) / sizeof(readtab[0]); i++) { + for (i = 0; i < nitems(readtab); i++) { WRITE4(sc, HE_REGO_HOST_CNTL, val | readtab[i]); BARRIER_W(sc); DELAY(EEPROM_DELAY); -- cgit v1.1