From 3dc6c75d0c07ecc991a928fa05a5080a9147e442 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 4 Jan 2006 09:59:07 +0000 Subject: Deorbit ttymalloc() in preference for ttyalloc() --- sys/kern/tty.c | 18 ++---------------- sys/sys/tty.h | 1 - 2 files changed, 2 insertions(+), 17 deletions(-) (limited to 'sys') diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 1babc3d..363c31c 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2827,17 +2827,10 @@ ttyrel(struct tty *tp) * tty_open(). */ struct tty * -ttymalloc(struct tty *tp) +ttyalloc() { + struct tty *tp; - if (tp) { - /* - * XXX: Either this argument should go away, or we should - * XXX: require it and do a ttyrel(tp) here and allocate - * XXX: a new tty. For now do nothing. - */ - return(tp); - } tp = malloc(sizeof *tp, M_TTYS, M_WAITOK | M_ZERO); mtx_init(&tp->t_mtx, "tty", NULL, MTX_DEF); @@ -2862,13 +2855,6 @@ ttymalloc(struct tty *tp) return (tp); } -struct tty * -ttyalloc() -{ - - return (ttymalloc(NULL)); -} - static void ttypurge(struct cdev *dev) { diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 1eceefd..81f4f9c 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -360,7 +360,6 @@ void ttyinitmode(struct tty *tp, int echo, int speed); int ttyinput(int c, struct tty *tp); int ttylclose(struct tty *tp, int flag); void ttyldoptim(struct tty *tp); -struct tty *ttymalloc(struct tty *tp); int ttymodem(struct tty *tp, int flag); int tty_open(struct cdev *device, struct tty *tp); int ttyref(struct tty *tp); -- cgit v1.1