summaryrefslogtreecommitdiffstats
path: root/sys/dev/rp/rp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/rp/rp.c')
-rw-r--r--sys/dev/rp/rp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index 520ca80..45f59d3 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -903,7 +903,9 @@ rpopen(struct tty *tp)
rp_callout_handle = timeout(rp_do_poll,
(void *)NULL, POLL_INTERVAL);
+ newbus_xlock();
device_busy(rp->rp_ctlp->dev);
+ newbus_xunlock();
return(0);
}
@@ -914,7 +916,9 @@ rpclose(struct tty *tp)
rp = tty_softc(tp);
rphardclose(tp);
+ newbus_xlock();
device_unbusy(rp->rp_ctlp->dev);
+ newbus_xunlock();
}
static void
OpenPOWER on IntegriCloud