Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/bluetooth btuart(4): Convert to ttylock/ttyunlock.



details:   https://anonhg.NetBSD.org/src/rev/82c7577dfa06
branches:  trunk
changeset: 372088:82c7577dfa06
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Oct 26 23:44:03 2022 +0000

description:
btuart(4): Convert to ttylock/ttyunlock.

diffstat:

 sys/dev/bluetooth/btuart.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r bdec562f45f6 -r 82c7577dfa06 sys/dev/bluetooth/btuart.c
--- a/sys/dev/bluetooth/btuart.c        Wed Oct 26 23:43:34 2022 +0000
+++ b/sys/dev/bluetooth/btuart.c        Wed Oct 26 23:44:03 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: btuart.c,v 1.30 2022/06/28 13:25:36 plunky Exp $       */
+/*     $NetBSD: btuart.c,v 1.31 2022/10/26 23:44:03 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2006, 2007 KIYOHARA Takashi
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.30 2022/06/28 13:25:36 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.31 2022/10/26 23:44:03 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -265,9 +265,9 @@
        sc->sc_tp = tp;
        tp->t_sc = sc;
 
-       mutex_spin_enter(&tty_lock);
+       ttylock(tp);
        ttyflush(tp, FREAD | FWRITE);
-       mutex_spin_exit(&tty_lock);
+       ttyunlock(tp);
 
        splx(s);
 
@@ -283,9 +283,9 @@
 
        s = spltty();
 
-       mutex_spin_enter(&tty_lock);
+       ttylock(tp);
        ttyflush(tp, FREAD | FWRITE);
-       mutex_spin_exit(&tty_lock);     /* XXX */
+       ttyunlock(tp);  /* XXX */
 
        ttyldisc_release(tp->t_linesw);
        tp->t_linesw = ttyldisc_default();



Home | Main Index | Thread Index | Old Index