diff options
author | Michael Knudsen <mk@cvs.openbsd.org> | 2009-04-21 19:36:18 +0000 |
---|---|---|
committer | Michael Knudsen <mk@cvs.openbsd.org> | 2009-04-21 19:36:18 +0000 |
commit | 3714d7b379bdde87f35cbeef7c94b70a057cb93a (patch) | |
tree | 77bd35218f14918c75fcedbd3aef2d171757c6ac /sys | |
parent | cf01bb9c5205279af3e81b23e0edf031002b34cb (diff) |
Switch aps(4) to use timeout_add_msec() instead of timeout_add() with a
calculation of ticks. Saves 26 bytes.
ok oga `fine' deraadt
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/isa/aps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/isa/aps.c b/sys/dev/isa/aps.c index ca9a9a410db..b941f334da7 100644 --- a/sys/dev/isa/aps.c +++ b/sys/dev/isa/aps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aps.c,v 1.17 2008/06/27 06:08:43 canacar Exp $ */ +/* $OpenBSD: aps.c,v 1.18 2009/04/21 19:36:17 mk Exp $ */ /* * Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org> * Copyright (c) 2008 Can Erkin Acar <canacar@openbsd.org> @@ -353,7 +353,7 @@ aps_attach(struct device *parent, struct device *self, void *aux) /* Refresh sensor data every 0.5 seconds */ timeout_set(&aps_timeout, aps_refresh, sc); - timeout_add(&aps_timeout, (5 * hz) / 10); + timeout_add_msec(&aps_timeout, 500); return; out: printf("%s: failed to initialize\n", sc->sc_dev.dv_xname); @@ -481,7 +481,7 @@ aps_refresh(void *arg) struct aps_softc *sc = (struct aps_softc *)arg; aps_refresh_sensor_data(sc); - timeout_add(&aps_timeout, (5 * hz) / 10); + timeout_add_msec(&aps_timeout, 500); } void @@ -507,5 +507,5 @@ aps_power(int why, void *arg) || aps_init(iot, ioh)) printf("aps: failed to wake up\n"); else - timeout_add(&aps_timeout, (5 * hz) / 10); + timeout_add_msec(&aps_timeout, 500); } |