summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-10-26 23:43:21 +0000
committerriastradh <riastradh@NetBSD.org>2022-10-26 23:43:21 +0000
commit25851acdc372da8b329de87733dbae51f40e1c95 (patch)
treef339f5412bb8dc6cdfe34afa1611428b97a60647 /sys/dev
parent84665a60e21457c98bee8650e115feb4b7de093d (diff)
bcsp(4): Convert to ttylock/ttyunlock.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/bluetooth/bcsp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/bluetooth/bcsp.c b/sys/dev/bluetooth/bcsp.c
index 2b6aa9157a2..5f12f97a988 100644
--- a/sys/dev/bluetooth/bcsp.c
+++ b/sys/dev/bluetooth/bcsp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bcsp.c,v 1.32 2022/06/28 13:25:36 plunky Exp $ */
+/* $NetBSD: bcsp.c,v 1.33 2022/10/26 23:43:21 riastradh Exp $ */
/*
* Copyright (c) 2007 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.32 2022/06/28 13:25:36 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.33 2022/10/26 23:43:21 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -406,11 +406,11 @@ bcspopen(dev_t device __unused, struct tty *tp)
}
sc = device_private(dev);
- mutex_spin_enter(&tty_lock);
+ ttylock(tp);
tp->t_sc = sc;
sc->sc_tp = tp;
ttyflush(tp, FREAD | FWRITE);
- mutex_spin_exit(&tty_lock);
+ ttyunlock(tp);
splx(s);
@@ -439,9 +439,9 @@ bcspclose(struct tty *tp, int flag __unused)
MBUFQ_DRAIN(&sc->sc_dgq);
bcsp_sequencing_reset(sc);
- 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();
if (sc != NULL) {