summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-10-26 23:53:03 +0000
committerriastradh <riastradh@NetBSD.org>2022-10-26 23:53:03 +0000
commit10fbbe4accc1495e7e54199622d1c8d75287a2f8 (patch)
tree94ed42ce8c7fa4ef9d9045bef7fc8de3f3a6e016 /sys/dev
parent9ededf9ec6a66f6c7329bda6772e53dea173d33c (diff)
uhso(4): Convert locking comments to locking assertions.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uhso.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/usb/uhso.c b/sys/dev/usb/uhso.c
index 6142fb6bb56..f67e25b2d30 100644
--- a/sys/dev/usb/uhso.c
+++ b/sys/dev/usb/uhso.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhso.c,v 1.36 2022/09/03 02:48:00 thorpej Exp $ */
+/* $NetBSD: uhso.c,v 1.37 2022/10/26 23:53:03 riastradh Exp $ */
/*-
* Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.36 2022/09/03 02:48:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.37 2022/10/26 23:53:03 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1759,7 +1759,6 @@ uhso_tty_do_ioctl(struct uhso_port *hp, u_long cmd, void *data, int flag,
return error;
}
-/* this is called with tty_lock held */
static void
uhso_tty_stop(struct tty *tp, int flag)
{
@@ -1768,6 +1767,8 @@ uhso_tty_stop(struct tty *tp, int flag)
UHSOUNIT(tp->t_dev));
struct uhso_port *hp = sc->sc_port[UHSOPORT(tp->t_dev)];
#endif
+
+ KASSERT(ttylocked(tp));
}
static struct tty *
@@ -1838,7 +1839,6 @@ uhso_tty_param(struct tty *tp, struct termios *t)
return 0;
}
-/* this is called with tty_lock held */
Static void
uhso_tty_start(struct tty *tp)
{
@@ -1847,6 +1847,8 @@ uhso_tty_start(struct tty *tp)
struct uhso_port *hp = sc->sc_port[UHSOPORT(tp->t_dev)];
int s;
+ KASSERT(ttylocked(tp));
+
if (!device_is_active(sc->sc_dev))
return;