Module Name: src Committed By: riastradh Date: Wed Oct 26 23:44:03 UTC 2022
Modified Files: src/sys/dev/bluetooth: btuart.c Log Message: btuart(4): Convert to ttylock/ttyunlock. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/bluetooth/btuart.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/bluetooth/btuart.c diff -u src/sys/dev/bluetooth/btuart.c:1.30 src/sys/dev/bluetooth/btuart.c:1.31 --- src/sys/dev/bluetooth/btuart.c:1.30 Tue Jun 28 13:25:36 2022 +++ src/sys/dev/bluetooth/btuart.c Wed Oct 26 23:44:03 2022 @@ -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 @@ btuartopen(dev_t devno __unused, struct 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 @@ btuartclose(struct tty *tp, int flag __u 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();