summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2019-10-07 22:40:36 +0000
committercheloha <cheloha@cvs.openbsd.org>2019-10-07 22:40:36 +0000
commit4ddcc7cdf06b3f80cb5cded5a75ffd4482d1ad5c (patch)
tree744d88524bc76c9785b39ddceeda5cc92cb56d7c /sys
parent50edf7ce1f57b3ad1a2fd5db5fbc8ce7c316ba90 (diff)
octmmc(4): msleep(9) -> msleep_nsec(9); ok visa@ kn@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/octeon/dev/octmmc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/octeon/dev/octmmc.c b/sys/arch/octeon/dev/octmmc.c
index b013e46275d..cb9c5de69a7 100644
--- a/sys/arch/octeon/dev/octmmc.c
+++ b/sys/arch/octeon/dev/octmmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: octmmc.c,v 1.13 2019/01/13 16:45:44 visa Exp $ */
+/* $OpenBSD: octmmc.c,v 1.14 2019/10/07 22:40:35 cheloha Exp $ */
/*
* Copyright (c) 2016, 2017 Visa Hankala
@@ -965,7 +965,7 @@ octmmc_get_response(struct octmmc_softc *sc, struct sdmmc_command *cmd)
}
int
-octmmc_wait_intr(struct octmmc_softc *sc, uint64_t mask, int timeout)
+octmmc_wait_intr(struct octmmc_softc *sc, uint64_t mask, int secs)
{
MUTEX_ASSERT_LOCKED(&sc->sc_intr_mtx);
@@ -973,8 +973,8 @@ octmmc_wait_intr(struct octmmc_softc *sc, uint64_t mask, int timeout)
sc->sc_intr_status = 0;
while ((sc->sc_intr_status & mask) == 0) {
- if (msleep(&sc->sc_intr_status, &sc->sc_intr_mtx, PWAIT,
- "hcintr", timeout * hz) == EWOULDBLOCK)
+ if (msleep_nsec(&sc->sc_intr_status, &sc->sc_intr_mtx, PWAIT,
+ "hcintr", SEC_TO_NSEC(secs)) == EWOULDBLOCK)
return ETIMEDOUT;
}
return 0;