From 9a35a12d5659090b9013cca0d8a856a88aea63a1 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Mon, 6 Mar 2017 09:06:21 +0000 Subject: Use nitems() when passing all known parameters to wsmouse_configure(). ok bru@ --- sys/dev/pckbc/pms.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c index 7eaee91002f..0aeeedfcd73 100644 --- a/sys/dev/pckbc/pms.c +++ b/sys/dev/pckbc/pms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pms.c,v 1.73 2017/02/27 16:40:10 bru Exp $ */ +/* $OpenBSD: pms.c,v 1.74 2017/03/06 09:06:20 mpi Exp $ */ /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -235,7 +235,6 @@ static struct wsmouse_param synaptics_params[] = { { WSMOUSECFG_PRESSURE_LO, SYNAPTICS_PRESSURE_LO }, { WSMOUSECFG_PRESSURE_HI, SYNAPTICS_PRESSURE_HI } }; -#define SYNAPTICS_NPARAMS 2 int pmsprobe(struct device *, void *, void *); void pmsattach(struct device *, struct device *, void *); @@ -1073,8 +1072,8 @@ pms_enable_synaptics(struct pms_softc *sc) wsmousedevprint); } - if (wsmouse_configure(sc->sc_wsmousedev, - synaptics_params, SYNAPTICS_NPARAMS)) + if (wsmouse_configure(sc->sc_wsmousedev, synaptics_params, + nitems(synaptics_params))) goto err; printf("%s: Synaptics %s, firmware %d.%d\n", DEVNAME(sc), -- cgit v1.2.3