jcs's openbsd hax
openbsd

sunkbd(4): timeout_add(9) -> timeout_add_msec(9); ok kettenis@

cheloha f0cdf84b aff96eed

+3 -7
+3 -7
sys/dev/sun/sunkbd.c
··· 1 - /* $OpenBSD: sunkbd.c,v 1.27 2016/03/19 11:41:56 mpi Exp $ */ 1 + /* $OpenBSD: sunkbd.c,v 1.28 2020/04/06 19:03:09 cheloha Exp $ */ 2 2 3 3 /* 4 4 * Copyright (c) 2002 Jason L. Wright (jason@thought.net) ··· 84 84 void 85 85 sunkbd_bell(struct sunkbd_softc *sc, u_int period, u_int pitch, u_int volume) 86 86 { 87 - int nticks, s; 87 + int s; 88 88 u_int8_t c = SKBD_CMD_BELLON; 89 89 90 90 #if NTCTRL > 0 ··· 103 103 return; 104 104 } 105 105 if (sc->sc_bellactive == 0) { 106 - nticks = (period * hz) / 1000; 107 - if (nticks <= 0) 108 - nticks = 1; 109 - 110 106 sc->sc_bellactive = 1; 111 107 sc->sc_belltimeout = 1; 112 108 (*sc->sc_sendcmd)(sc, &c, 1); 113 - timeout_add(&sc->sc_bellto, nticks); 109 + timeout_add_msec(&sc->sc_bellto, period); 114 110 } 115 111 splx(s); 116 112 }