diff options
author | kn <kn@cvs.openbsd.org> | 2019-06-14 13:20:50 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2019-06-14 13:20:50 +0000 |
commit | 804c8127490109a1a2a836312d6651cbb97107e7 (patch) | |
tree | dbaf4340cd441ff60bf0e07e2d6294cf638e7cd7 /sys/dev | |
parent | 26336d0eeab080b64e6a80dcb54bd45d7331b456 (diff) |
Use timeout_add_msec(9)
UPGT_LED_ACTION_TMP_DUR is 100ms, avoid converting to Hz and back again.
OK kevlo
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/if_upgt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c index d6db1086dd3..6c8b66842fb 100644 --- a/sys/dev/usb/if_upgt.c +++ b/sys/dev/usb/if_upgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upgt.c,v 1.83 2019/04/25 01:52:14 kevlo Exp $ */ +/* $OpenBSD: if_upgt.c,v 1.84 2019/06/14 13:20:49 kn Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -2014,7 +2014,6 @@ upgt_set_led(struct upgt_softc *sc, int action) struct upgt_data *data_cmd = &sc->cmd_data; struct upgt_lmac_mem *mem; struct upgt_lmac_led *led; - struct timeval t; int len; /* @@ -2063,9 +2062,7 @@ upgt_set_led(struct upgt_softc *sc, int action) led->action_tmp_dur = htole16(UPGT_LED_ACTION_TMP_DUR); /* lock blink */ sc->sc_led_blink = 1; - t.tv_sec = 0; - t.tv_usec = UPGT_LED_ACTION_TMP_DUR * 1000L; - timeout_add(&sc->led_to, tvtohz(&t)); + timeout_add_msec(&sc->led_to, UPGT_LED_ACTION_TMP_DUR); break; default: return; |