summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1994-04-11 21:53:54 +0000
committercgd <cgd@NetBSD.org>1994-04-11 21:53:54 +0000
commit49b3055feb236c47a074e4ce4392969554db6496 (patch)
tree1c68d1daf95d3fac90d6c51be88e812ceb2d23b0 /sys/dev
parentbfefadcc748cd955c8bd9ac91c42e8ef3a710122 (diff)
undo that last
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cons.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/cons.c b/sys/dev/cons.c
index c5dd34af751..34cd443264e 100644
--- a/sys/dev/cons.c
+++ b/sys/dev/cons.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
- * $Id: cons.c,v 1.14 1994/04/11 19:53:29 cgd Exp $
+ * $Id: cons.c,v 1.15 1994/04/11 21:53:54 cgd Exp $
*/
#include <sys/param.h>
@@ -101,14 +101,8 @@ cnopen(dev, flag, mode, p)
*/
dev = cn_tab->cn_dev;
if (cn_devvp == NULLVP) {
- /*
- * try to get a reference on its vnode, but fail silently
- * vfinddev XXX
- */
- if (vfinddev(dev, VCHR, &cn_devvp) == 0 && vcount(cn_devvp))
- vref(cn_devvp);
- else
- cdevvp(dev, &cn_devvp);
+ /* try to get a reference on its vnode, but fail silently */
+ cdevvp(dev, &cn_devvp);
}
return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p));
}
@@ -135,7 +129,7 @@ cnclose(dev, flag, mode, p)
vrele(cn_devvp);
cn_devvp = NULLVP;
}
- if ((vfinddev(dev, VCHR, &vp) == 0) && vcount(vp)) /* XXX */
+ if ((vfinddev(dev, VCHR, &vp) == 0) && vcount(vp))
return (0);
return ((*cdevsw[major(dev)].d_close)(dev, flag, mode, p));
}