summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-01-09 14:35:21 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-01-09 14:35:21 +0000
commit25aaeac2e7ff4e81296b12f4c7c9ae1e6369da89 (patch)
tree0f8f6679b0fd02d5814725a02c6390bd0e87ac9c /sys/dev/i2c
parent2a3120725f4d4b08fb2361463775f11844321eb0 (diff)
Convert sleeps of 1sec or more to tsleep_nsec(9).
ok bluhm@
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/iatp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/i2c/iatp.c b/sys/dev/i2c/iatp.c
index 7c6fdad4dbe..cb5021dcfb5 100644
--- a/sys/dev/i2c/iatp.c
+++ b/sys/dev/i2c/iatp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iatp.c,v 1.6 2018/07/30 15:56:30 jcs Exp $ */
+/* $OpenBSD: iatp.c,v 1.7 2020/01/09 14:35:19 mpi Exp $ */
/*
* Atmel maXTouch i2c touchscreen/touchpad driver
* Copyright (c) 2016 joshua stein <jcs@openbsd.org>
@@ -347,7 +347,8 @@ iatp_enable(void *v)
{
struct iatp_softc *sc = v;
- if (sc->sc_busy && tsleep(&sc->sc_busy, PRIBIO, "iatp", hz) != 0) {
+ if (sc->sc_busy &&
+ tsleep_nsec(&sc->sc_busy, PRIBIO, "iatp", SEC_TO_NSEC(1)) != 0) {
printf("%s: trying to enable but we're busy\n",
sc->sc_dev.dv_xname);
return 1;