Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2c tsleep -> kpause



details:   https://anonhg.NetBSD.org/src/rev/6bf39b60fd54
branches:  trunk
changeset: 467141:6bf39b60fd54
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jan 15 05:56:57 2020 +0000

description:
tsleep -> kpause

diffstat:

 sys/dev/i2c/at24cxx.c |  8 ++++----
 sys/dev/i2c/tsl256x.c |  7 +++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diffs (57 lines):

diff -r 2a91bea3265c -r 6bf39b60fd54 sys/dev/i2c/at24cxx.c
--- a/sys/dev/i2c/at24cxx.c     Wed Jan 15 01:11:05 2020 +0000
+++ b/sys/dev/i2c/at24cxx.c     Wed Jan 15 05:56:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: at24cxx.c,v 1.35 2019/12/23 15:51:50 thorpej Exp $     */
+/*     $NetBSD: at24cxx.c,v 1.36 2020/01/15 06:09:36 thorpej Exp $     */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.35 2019/12/23 15:51:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.36 2020/01/15 06:09:36 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -392,8 +392,8 @@
                if (error == 0)
                        break;
 
-               rv = tsleep(sc, PRIBIO | PCATCH, "seepromwr", timeout);
-               if (rv != EWOULDBLOCK)
+               rv = kpause("seepromwr", true, timeout, NULL);
+               if (rv != EWOULDBLOCK && rv != 0)
                        return (rv);
        }
 
diff -r 2a91bea3265c -r 6bf39b60fd54 sys/dev/i2c/tsl256x.c
--- a/sys/dev/i2c/tsl256x.c     Wed Jan 15 01:11:05 2020 +0000
+++ b/sys/dev/i2c/tsl256x.c     Wed Jan 15 05:56:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tsl256x.c,v 1.7 2019/07/25 04:25:40 thorpej Exp $ */
+/* $NetBSD: tsl256x.c,v 1.8 2020/01/15 05:56:57 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jason R. Thorpe
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tsl256x.c,v 1.7 2019/07/25 04:25:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsl256x.c,v 1.8 2020/01/15 05:56:57 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -652,8 +652,7 @@
                delay(ms * 1000);
        } else {
                /* Round up one tick for the case where we sleep. */
-               (void) tsleep(tsllux_wait_for_adcs, PWAIT, "tslluxwait",
-                             mstohz(ms) + 1);
+               (void) kpause("tslluxwait", false, mstohz(ms) + 1, NULL);
        }
 
        return (0);



Home | Main Index | Thread Index | Old Index