aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/snp/snp.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2019-11-29 03:51:01 +0000
committerKyle Evans <kevans@FreeBSD.org>2019-11-29 03:51:01 +0000
commited6232893c9dffec587a18afca04137d98328ab0 (patch)
treeb1d5dd43bbc1efe28306212f59f55d3a80ccb70c /sys/dev/snp/snp.c
parent74aed808a1bcb1363cbc2c48ee89e39e90c041d1 (diff)
downloadsrc-ed6232893c9dffec587a18afca04137d98328ab0.tar.gz
src-ed6232893c9dffec587a18afca04137d98328ab0.zip
snp: don't reference tp->t_mtx directly
This is the only part of snp(4) that pokes around in struct tty directly; replace it with the tty_getlock accessor to avoid struct tty internals.
Notes
Notes: svn path=/head/; revision=355205
Diffstat (limited to 'sys/dev/snp/snp.c')
-rw-r--r--sys/dev/snp/snp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index dce8a9846558..64e2d0f64537 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -178,7 +178,7 @@ snp_read(struct cdev *dev, struct uio *uio, int flag)
error = EWOULDBLOCK;
break;
}
- error = cv_wait_sig(&ss->snp_outwait, tp->t_mtx);
+ error = cv_wait_sig(&ss->snp_outwait, tty_getlock(tp));
if (error != 0)
break;
if (tty_gone(tp)) {