summaryrefslogtreecommitdiffstats
path: root/sys/dev/nmdm
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-05-29 06:41:23 +0000
committered <ed@FreeBSD.org>2009-05-29 06:41:23 +0000
commit8d73adc757c1e55e55c2f44cc26e036dc046c5cb (patch)
tree8504d18b61b10ae1ba84f3c8d91f1f3572bcce6f /sys/dev/nmdm
parentfa743d1903e55eeb33e40743baf3fe61efd7f4ad (diff)
downloadFreeBSD-src-8d73adc757c1e55e55c2f44cc26e036dc046c5cb.zip
FreeBSD-src-8d73adc757c1e55e55c2f44cc26e036dc046c5cb.tar.gz
Last minute TTY API change: remove mutex argument from tty_alloc().
I don't want people to override the mutex when allocating a TTY. It has to be there, to keep drivers like syscons happy. So I'm creating a tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex() should eventually be removed. The advantage of this approach, is that we can just remove a function, without breaking the regular API in the future.
Diffstat (limited to 'sys/dev/nmdm')
-rw-r--r--sys/dev/nmdm/nmdm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c
index 2c41290..d2fe877 100644
--- a/sys/dev/nmdm/nmdm.c
+++ b/sys/dev/nmdm/nmdm.c
@@ -117,11 +117,11 @@ nmdm_alloc(unsigned long unit)
callout_init(&ns->ns_part2.np_callout, CALLOUT_MPSAFE);
/* Create device nodes. */
- tp = ns->ns_part1.np_tty = tty_alloc(&nmdm_class, &ns->ns_part1,
+ tp = ns->ns_part1.np_tty = tty_alloc_mutex(&nmdm_class, &ns->ns_part1,
&ns->ns_mtx);
tty_makedev(tp, NULL, "nmdm%luA", unit);
- tp = ns->ns_part2.np_tty = tty_alloc(&nmdm_class, &ns->ns_part2,
+ tp = ns->ns_part2.np_tty = tty_alloc_mutex(&nmdm_class, &ns->ns_part2,
&ns->ns_mtx);
tty_makedev(tp, NULL, "nmdm%luB", unit);
OpenPOWER on IntegriCloud