diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-10-26 23:43:34 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-10-26 23:43:34 +0000 |
| commit | c87f69a647828f7046952902a8853b0967043dee (patch) | |
| tree | 7610e9e01365971e8703b6e0dd27847499015f75 /sys/dev | |
| parent | 25851acdc372da8b329de87733dbae51f40e1c95 (diff) | |
bth5(4): Convert to ttylock/ttyunlock.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/bluetooth/bth5.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/bluetooth/bth5.c b/sys/dev/bluetooth/bth5.c index 06458b5611d..0e2c2a149e2 100644 --- a/sys/dev/bluetooth/bth5.c +++ b/sys/dev/bluetooth/bth5.c @@ -1,4 +1,4 @@ -/* $NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $ */ +/* $NetBSD: bth5.c,v 1.8 2022/10/26 23:43:34 riastradh Exp $ */ /* * Copyright (c) 2017 Nathanial Sloss <nathanialsloss@yahoo.com.au> * All rights reserved. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.8 2022/10/26 23:43:34 riastradh Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -411,11 +411,11 @@ bth5open(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); @@ -444,9 +444,9 @@ bth5close(struct tty *tp, int flag __unused) MBUFQ_DRAIN(&sc->sc_dgq); bth5_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) { |
