From 53bdbc3f35f386afa8bcb16e0cc163d49fd6c4e1 Mon Sep 17 00:00:00 2001 From: riastradh Date: Wed, 26 Oct 2022 23:44:03 +0000 Subject: btuart(4): Convert to ttylock/ttyunlock. --- sys/dev/bluetooth/btuart.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/bluetooth/btuart.c b/sys/dev/bluetooth/btuart.c index 0bdd0aaaff4..91eaa7a38b7 100644 --- a/sys/dev/bluetooth/btuart.c +++ b/sys/dev/bluetooth/btuart.c @@ -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 -__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 #include @@ -265,9 +265,9 @@ btuartopen(dev_t devno __unused, struct tty *tp) 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 __unused) 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(); -- cgit