Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
This commit is contained in:
parent
d4c49b6d11
commit
2626d57668
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: a12dc.c,v 1.24 2009/11/21 05:35:40 rmind Exp $ */
|
||||
/* $NetBSD: a12dc.c,v 1.25 2011/04/24 16:26:52 rmind Exp $ */
|
||||
|
||||
/* [Notice revision 2.2]
|
||||
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
|
||||
@ -64,12 +64,11 @@
|
||||
#ifndef BSIDE
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: a12dc.c,v 1.24 2009/11/21 05:35:40 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: a12dc.c,v 1.25 2011/04/24 16:26:52 rmind Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#include <sys/tty.h>
|
||||
#include <sys/proc.h>
|
||||
@ -158,9 +157,9 @@ a12dcattach(struct device *parent, struct device *self, void *aux)
|
||||
/* note that we've attached the chipset; can't have 2 A12Cs. */
|
||||
a12dcfound = 1;
|
||||
|
||||
printf(": driver %s\n", "$Revision: 1.24 $");
|
||||
printf(": driver %s\n", "$Revision: 1.25 $");
|
||||
|
||||
tp = a12dc_tty[0] = ttymalloc();
|
||||
tp = a12dc_tty[0] = tty_alloc();
|
||||
tp->t_oproc = a12dcstart;
|
||||
tp->t_param = a12dcparam;
|
||||
tty_attach(tp);
|
||||
@ -170,7 +169,7 @@ a12dcattach(struct device *parent, struct device *self, void *aux)
|
||||
}
|
||||
|
||||
void
|
||||
a12dc_init(struct a12dc_config *ccp, int mallocsafe)
|
||||
a12dc_init(struct a12dc_config *ccp, int sleepsafe)
|
||||
{
|
||||
}
|
||||
|
||||
@ -269,7 +268,7 @@ a12dcopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
#endif
|
||||
|
||||
if (!a12dc_tty[unit]) {
|
||||
tp = a12dc_tty[unit] = ttymalloc();
|
||||
tp = a12dc_tty[unit] = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = a12dc_tty[unit];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: promcons.c,v 1.35 2009/11/21 05:35:40 rmind Exp $ */
|
||||
/* $NetBSD: promcons.c,v 1.36 2011/04/24 16:26:52 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.35 2009/11/21 05:35:40 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: promcons.c,v 1.36 2011/04/24 16:26:52 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -98,7 +98,7 @@ promopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
s = spltty();
|
||||
|
||||
if (!prom_tty[unit]) {
|
||||
tp = prom_tty[unit] = ttymalloc();
|
||||
tp = prom_tty[unit] = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = prom_tty[unit];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ite.c,v 1.91 2011/02/08 20:20:08 rmind Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.92 2011/04/24 16:26:52 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -46,7 +46,7 @@
|
||||
#include "opt_ddb.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.91 2011/02/08 20:20:08 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.92 2011/04/24 16:26:52 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -426,7 +426,7 @@ iteopen(dev_t dev, int mode, int devtype, struct lwp *l)
|
||||
return ENXIO;
|
||||
|
||||
if (ip->tp == NULL) {
|
||||
tp = ip->tp = ttymalloc();
|
||||
tp = ip->tp = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = ip->tp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mfc.c,v 1.53 2009/10/26 19:16:54 cegger Exp $ */
|
||||
/* $NetBSD: mfc.c,v 1.54 2011/04/24 16:26:52 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1990 The Regents of the University of California.
|
||||
@ -55,7 +55,7 @@
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mfc.c,v 1.53 2009/10/26 19:16:54 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mfc.c,v 1.54 2011/04/24 16:26:52 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -64,7 +64,6 @@ __KERNEL_RCSID(0, "$NetBSD: mfc.c,v 1.53 2009/10/26 19:16:54 cegger Exp $");
|
||||
#include <sys/tty.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/queue.h>
|
||||
@ -490,7 +489,7 @@ mfcsopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
if (sc->sc_tty)
|
||||
tp = sc->sc_tty;
|
||||
else {
|
||||
tp = sc->sc_tty = ttymalloc();
|
||||
tp = sc->sc_tty = tty_alloc();
|
||||
tty_attach(tp);
|
||||
}
|
||||
|
||||
@ -603,7 +602,7 @@ mfcsclose(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
#if not_yet
|
||||
if (tp != &mfcs_cons) {
|
||||
remove_vbl_function(&sc->vbl_node);
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
sc->sc_tty = (struct tty *) NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msc.c,v 1.42 2010/05/25 02:21:30 jklos Exp $ */
|
||||
/* $NetBSD: msc.c,v 1.43 2011/04/24 16:26:52 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: msc.c,v 1.42 2010/05/25 02:21:30 jklos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: msc.c,v 1.43 2011/04/24 16:26:52 rmind Exp $");
|
||||
|
||||
#include "msc.h"
|
||||
|
||||
@ -104,7 +104,6 @@ __KERNEL_RCSID(0, "$NetBSD: msc.c,v 1.42 2010/05/25 02:21:30 jklos Exp $");
|
||||
#include <sys/tty.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/syslog.h>
|
||||
@ -348,7 +347,7 @@ mscopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
|
||||
if (!msc_tty[ttyn]) {
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tty_attach(tp);
|
||||
msc_tty[ttyn] = tp;
|
||||
msc_tty[ttyn+1] = (struct tty *)NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ser.c,v 1.78 2008/06/11 12:59:10 tsutsui Exp $ */
|
||||
/* $NetBSD: ser.c,v 1.79 2011/04/24 16:26:52 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -40,7 +40,7 @@
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.78 2008/06/11 12:59:10 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.79 2011/04/24 16:26:52 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -49,7 +49,6 @@ __KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.78 2008/06/11 12:59:10 tsutsui Exp $");
|
||||
#include <sys/tty.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/syslog.h>
|
||||
@ -257,7 +256,7 @@ serattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
if (0 == serconsole)
|
||||
serconsinit = 0;
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = (void (*) (struct tty *)) serstart;
|
||||
tp->t_param = serparam;
|
||||
tp->t_hwiflow = serhwiflow;
|
||||
@ -419,7 +418,7 @@ ser_shutdown(struct ser_softc *sc)
|
||||
#if not_yet
|
||||
if (tp != &ser_cons) {
|
||||
remove_vbl_function(&ser_vbl_node);
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
ser_tty = (struct tty *) NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pccons.c,v 1.57 2009/03/14 21:04:04 dsl Exp $ */
|
||||
/* $NetBSD: pccons.c,v 1.58 2011/04/24 16:26:53 rmind Exp $ */
|
||||
/* $OpenBSD: pccons.c,v 1.22 1999/01/30 22:39:37 imp Exp $ */
|
||||
/* NetBSD: pccons.c,v 1.89 1995/05/04 19:35:20 cgd Exp */
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.57 2009/03/14 21:04:04 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.58 2011/04/24 16:26:53 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -600,7 +600,7 @@ pcopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
return ENXIO;
|
||||
|
||||
if (!sc->sc_tty) {
|
||||
tp = sc->sc_tty = ttymalloc();
|
||||
tp = sc->sc_tty = tty_alloc();
|
||||
}
|
||||
else {
|
||||
tp = sc->sc_tty;
|
||||
@ -638,7 +638,7 @@ pcclose(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
#ifdef notyet /* XXX */
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $Id: at91dbgu.c,v 1.4 2010/06/19 19:47:34 matt Exp $ */
|
||||
/* $NetBSD: at91dbgu.c,v 1.4 2010/06/19 19:47:34 matt Exp $ */
|
||||
/* $Id: at91dbgu.c,v 1.5 2011/04/24 16:26:53 rmind Exp $ */
|
||||
/* $NetBSD: at91dbgu.c,v 1.5 2011/04/24 16:26:53 rmind Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -83,7 +83,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: at91dbgu.c,v 1.4 2010/06/19 19:47:34 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: at91dbgu.c,v 1.5 2011/04/24 16:26:53 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -243,7 +243,7 @@ at91dbgu_attach(device_t parent, device_t self, void *aux)
|
||||
DBGUREG(DBGU_IER) = DBGU_INT_RXRDY; // @@@@@
|
||||
}
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = at91dbgu_start;
|
||||
tp->t_param = at91dbgu_param;
|
||||
tp->t_hwiflow = at91dbgu_hwiflow;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $Id: at91usart.c,v 1.3 2009/10/23 06:53:13 snj Exp $ */
|
||||
/* $NetBSD: at91usart.c,v 1.3 2009/10/23 06:53:13 snj Exp $ */
|
||||
/* $Id: at91usart.c,v 1.4 2011/04/24 16:26:53 rmind Exp $ */
|
||||
/* $NetBSD: at91usart.c,v 1.4 2011/04/24 16:26:53 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Embedtronics Oy. All rights reserved.
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: at91usart.c,v 1.3 2009/10/23 06:53:13 snj Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: at91usart.c,v 1.4 2011/04/24 16:26:53 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -109,7 +109,6 @@ __KERNEL_RCSID(0, "$NetBSD: at91usart.c,v 1.3 2009/10/23 06:53:13 snj Exp $");
|
||||
#include <sys/file.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/vnode.h>
|
||||
@ -278,7 +277,7 @@ at91usart_attach_subr(struct at91usart_softc *sc, struct at91bus_attach_args *sa
|
||||
}
|
||||
#endif // NOTYET
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = at91usart_start;
|
||||
tp->t_param = at91usart_param;
|
||||
tp->t_hwiflow = at91usart_hwiflow;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: epcom.c,v 1.19 2009/03/14 14:45:55 dsl Exp $ */
|
||||
/* $NetBSD: epcom.c,v 1.20 2011/04/24 16:26:53 rmind Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998, 1999, 2001, 2002, 2004 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: epcom.c,v 1.19 2009/03/14 14:45:55 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: epcom.c,v 1.20 2011/04/24 16:26:53 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -201,7 +201,7 @@ epcom_attach_subr(struct epcom_softc *sc)
|
||||
SET(sc->sc_swflags, TIOCFLAG_SOFTCAR);
|
||||
}
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = epcomstart;
|
||||
tp->t_param = epcomparam;
|
||||
tp->t_hwiflow = epcomhwiflow;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: footbridge_com.c,v 1.32 2009/07/21 07:35:55 skrll Exp $ */
|
||||
/* $NetBSD: footbridge_com.c,v 1.33 2011/04/24 16:26:53 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 Mark Brinicombe
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: footbridge_com.c,v 1.32 2009/07/21 07:35:55 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: footbridge_com.c,v 1.33 2011/04/24 16:26:53 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_ddbparam.h"
|
||||
@ -227,7 +227,7 @@ fcomopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
if (!sc)
|
||||
return ENXIO;
|
||||
if (!(tp = sc->sc_tty))
|
||||
sc->sc_tty = tp = ttymalloc();
|
||||
sc->sc_tty = tp = tty_alloc();
|
||||
if (!sc->sc_rxbuffer[0]) {
|
||||
sc->sc_rxbuffer[0] = malloc(RX_BUFFER_SIZE, M_DEVBUF, M_WAITOK);
|
||||
sc->sc_rxbuffer[1] = malloc(RX_BUFFER_SIZE, M_DEVBUF, M_WAITOK);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: imxuart.c,v 1.7 2011/01/14 02:06:23 rmind Exp $ */
|
||||
/* $NetBSD: imxuart.c,v 1.8 2011/04/24 16:26:54 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009, 2010 Genetec Corporation. All rights reserved.
|
||||
@ -96,7 +96,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.7 2011/01/14 02:06:23 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.8 2011/04/24 16:26:54 rmind Exp $");
|
||||
|
||||
#include "opt_imxuart.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -433,7 +433,7 @@ imxuart_attach_common(device_t parent, device_t self,
|
||||
}
|
||||
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = imxustart;
|
||||
tp->t_param = imxuparam;
|
||||
tp->t_hwiflow = imxuhwiflow;
|
||||
@ -633,7 +633,7 @@ imxuart_detach(device_t self, int flags)
|
||||
* Ring buffer allocation failed in the imxuart_attach_subr,
|
||||
* only the tty is allocated, and nothing else.
|
||||
*/
|
||||
ttyfree(sc->sc_tty);
|
||||
tty_free(sc->sc_tty);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -642,7 +642,7 @@ imxuart_detach(device_t self, int flags)
|
||||
|
||||
/* Detach and free the tty. */
|
||||
tty_detach(sc->sc_tty);
|
||||
ttyfree(sc->sc_tty);
|
||||
tty_free(sc->sc_tty);
|
||||
|
||||
/* Unhook the soft interrupt handler. */
|
||||
softint_disestablish(sc->sc_si);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ixp12x0_com.c,v 1.37 2010/11/15 06:14:02 uebayasi Exp $ */
|
||||
/* $NetBSD: ixp12x0_com.c,v 1.38 2011/04/24 16:26:54 rmind Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixp12x0_com.c,v 1.37 2010/11/15 06:14:02 uebayasi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixp12x0_com.c,v 1.38 2011/04/24 16:26:54 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -200,7 +200,7 @@ ixpcom_attach_subr(struct ixpcom_softc *sc)
|
||||
SET(sc->sc_swflags, TIOCFLAG_SOFTCAR);
|
||||
}
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = ixpcomstart;
|
||||
tp->t_param = ixpcomparam;
|
||||
tp->t_hwiflow = ixpcomhwiflow;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sscom.c,v 1.32 2009/12/09 12:42:59 he Exp $ */
|
||||
/* $NetBSD: sscom.c,v 1.33 2011/04/24 16:26:54 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003 Fujitsu Component Limited
|
||||
@ -98,7 +98,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.32 2009/12/09 12:42:59 he Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.33 2011/04/24 16:26:54 rmind Exp $");
|
||||
|
||||
#include "opt_sscom.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -458,9 +458,7 @@ sscom_attach_subr(struct sscom_softc *sc)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = sscomstart;
|
||||
tp->t_param = sscomparam;
|
||||
tp->t_hwiflow = sscomhwiflow;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sa11x0_com.c,v 1.47 2010/08/19 15:17:53 tsutsui Exp $ */
|
||||
/* $NetBSD: sa11x0_com.c,v 1.48 2011/04/24 16:26:54 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc.
|
||||
@ -64,7 +64,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sa11x0_com.c,v 1.47 2010/08/19 15:17:53 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sa11x0_com.c,v 1.48 2011/04/24 16:26:54 rmind Exp $");
|
||||
|
||||
#include "opt_com.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -296,7 +296,7 @@ sacom_attach_subr(struct sacom_softc *sc)
|
||||
SET(sc->sc_swflags, TIOCFLAG_SOFTCAR);
|
||||
}
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = sacomstart;
|
||||
tp->t_param = sacomparam;
|
||||
tp->t_hwiflow = sacomhwiflow;
|
||||
@ -375,7 +375,7 @@ sacom_detach(device_t dev, int flags)
|
||||
|
||||
/* Detach and free the tty. */
|
||||
tty_detach(sc->sc_tty);
|
||||
ttyfree(sc->sc_tty);
|
||||
tty_free(sc->sc_tty);
|
||||
|
||||
/* Unhook the soft interrupt handler. */
|
||||
softint_disestablish(sc->sc_si);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ite.c,v 1.69 2011/02/08 20:20:10 rmind Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.70 2011/04/24 16:26:54 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.69 2011/02/08 20:20:10 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.70 2011/04/24 16:26:54 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -386,7 +386,7 @@ iteopen(dev_t dev, int mode, int devtype, struct lwp *l)
|
||||
return (ENXIO);
|
||||
|
||||
if (ip->tp == NULL) {
|
||||
tp = ip->tp = ttymalloc();
|
||||
tp = ip->tp = tty_alloc();
|
||||
tty_attach(tp);
|
||||
}
|
||||
else
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ser.c,v 1.51 2010/04/10 16:07:04 tsutsui Exp $ */
|
||||
/* $NetBSD: ser.c,v 1.52 2011/04/24 16:26:55 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.51 2010/04/10 16:07:04 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.52 2011/04/24 16:26:55 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_mbtype.h"
|
||||
@ -375,7 +375,7 @@ seropen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
return ENXIO;
|
||||
|
||||
if (!sc->sc_tty) {
|
||||
tp = sc->sc_tty = ttymalloc();
|
||||
tp = sc->sc_tty = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = sc->sc_tty;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: zs.c,v 1.72 2010/04/09 17:38:43 tsutsui Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.73 2011/04/24 16:26:55 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -79,7 +79,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.72 2010/04/09 17:38:43 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.73 2011/04/24 16:26:55 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -405,7 +405,7 @@ zsopen(dev_t dev, int flags, int mode, struct lwp *l)
|
||||
|
||||
tp = cs->cs_ttyp;
|
||||
if (tp == NULL) {
|
||||
cs->cs_ttyp = tp = ttymalloc();
|
||||
cs->cs_ttyp = tp = tty_alloc();
|
||||
tty_attach(tp);
|
||||
tp->t_dev = dev;
|
||||
tp->t_oproc = zsstart;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dz_ebus.c,v 1.1 2011/01/26 01:18:50 pooka Exp $ */
|
||||
/* $NetBSD: dz_ebus.c,v 1.2 2011/04/24 16:26:55 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.1 2011/01/26 01:18:50 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.2 2011/04/24 16:26:55 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -653,9 +653,9 @@ dz_ebus_attach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
/* Initialize our softc structure. Should be done in open? */
|
||||
|
||||
sc->sc_dz.dz_sc = sc;
|
||||
sc->sc_dz.dz_line = 0;
|
||||
sc->sc_dz.dz_tty = ttymalloc();
|
||||
sc->sc_dz.dz_sc = sc;
|
||||
sc->sc_dz.dz_line = 0;
|
||||
sc->sc_dz.dz_tty = tty_alloc();
|
||||
|
||||
evcnt_attach_dynamic(&sc->sc_rintrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
sc->sc_dev.dv_xname, "rintr");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: plcom.c,v 1.31 2009/12/06 21:38:42 dyoung Exp $ */
|
||||
/* $NetBSD: plcom.c,v 1.32 2011/04/24 16:26:55 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 ARM Ltd
|
||||
@ -94,7 +94,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.31 2009/12/06 21:38:42 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.32 2011/04/24 16:26:55 rmind Exp $");
|
||||
|
||||
#include "opt_plcom.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -392,7 +392,7 @@ plcom_attach_subr(struct plcom_softc *sc)
|
||||
if (sc->sc_fifolen > 1)
|
||||
SET(sc->sc_hwflags, PLCOM_HW_FIFO);
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = plcomstart;
|
||||
tp->t_param = plcomparam;
|
||||
tp->t_hwiflow = plcomhwiflow;
|
||||
@ -494,7 +494,7 @@ plcom_detach(struct device *self, int flags)
|
||||
|
||||
/* Detach and free the tty. */
|
||||
tty_detach(sc->sc_tty);
|
||||
ttyfree(sc->sc_tty);
|
||||
tty_free(sc->sc_tty);
|
||||
|
||||
/* Unhook the soft interrupt handler. */
|
||||
softint_disestablish(sc->sc_si);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xlcom.c,v 1.7 2008/06/11 23:52:36 cegger Exp $ */
|
||||
/* $NetBSD: xlcom.c,v 1.8 2011/04/24 16:26:55 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Jachym Holecek
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xlcom.c,v 1.7 2008/06/11 23:52:36 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xlcom.c,v 1.8 2011/04/24 16:26:55 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
@ -219,7 +219,7 @@ xlcom_attach(struct device *parent, struct device *self, void *aux)
|
||||
return ;
|
||||
}
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_dev = dev;
|
||||
tp->t_oproc = xlcom_start;
|
||||
tp->t_param = xlcom_param;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dcm.c,v 1.82 2011/02/08 20:20:13 rmind Exp $ */
|
||||
/* $NetBSD: dcm.c,v 1.83 2011/04/24 16:26:55 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.82 2011/02/08 20:20:13 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.83 2011/04/24 16:26:55 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
@ -498,7 +498,7 @@ dcmopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
return ENXIO;
|
||||
|
||||
if (sc->sc_tty[port] == NULL) {
|
||||
tp = sc->sc_tty[port] = ttymalloc();
|
||||
tp = sc->sc_tty[port] = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = sc->sc_tty[port];
|
||||
@ -598,7 +598,7 @@ dcmclose(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
ttyclose(tp);
|
||||
#if 0
|
||||
tty_detach(tp);
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
sc->sc_tty[port] == NULL;
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pdc.c,v 1.38 2011/01/13 21:15:14 skrll Exp $ */
|
||||
/* $NetBSD: pdc.c,v 1.39 2011/04/24 16:26:55 rmind Exp $ */
|
||||
|
||||
/* $OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $ */
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.38 2011/01/13 21:15:14 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.39 2011/04/24 16:26:55 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -262,10 +262,13 @@ pdcopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
|
||||
s = spltty();
|
||||
|
||||
if (sc->sc_tty)
|
||||
if (sc->sc_tty) {
|
||||
tp = sc->sc_tty;
|
||||
else
|
||||
tty_attach(tp = sc->sc_tty = ttymalloc());
|
||||
} else {
|
||||
tp = tty_alloc();
|
||||
sc->sc_tty = tp;
|
||||
tty_attach(tp);
|
||||
}
|
||||
|
||||
tp->t_oproc = pdcstart;
|
||||
tp->t_param = pdcparam;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: txcom.c,v 1.44 2010/07/20 15:03:53 tsutsui Exp $ */
|
||||
/* $NetBSD: txcom.c,v 1.45 2011/04/24 16:26:56 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: txcom.c,v 1.44 2010/07/20 15:03:53 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: txcom.c,v 1.45 2011/04/24 16:26:56 rmind Exp $");
|
||||
|
||||
#include "opt_tx39uart_debug.h"
|
||||
|
||||
@ -230,7 +230,7 @@ txcom_attach(struct device *parent, struct device *self, void *aux)
|
||||
}
|
||||
memset(sc->sc_rbuf, 0, TXCOM_RING_SIZE);
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = txcomstart;
|
||||
tp->t_param = txcomparam;
|
||||
tp->t_hwiflow = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: siotty.c,v 1.29 2009/11/23 00:11:44 rmind Exp $ */
|
||||
/* $NetBSD: siotty.c,v 1.30 2011/04/24 16:26:56 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.29 2009/11/23 00:11:44 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.30 2011/04/24 16:26:56 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -346,9 +346,9 @@ sioopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
if ((tp = sc->sc_tty) == NULL) {
|
||||
tp = sc->sc_tty = ttymalloc();
|
||||
tp = sc->sc_tty = tty_alloc();
|
||||
tty_attach(tp);
|
||||
}
|
||||
}
|
||||
|
||||
tp->t_oproc = siostart;
|
||||
tp->t_param = sioparam;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ofcons.c,v 1.24 2009/03/14 14:46:01 dsl Exp $ */
|
||||
/* $NetBSD: ofcons.c,v 1.25 2011/04/24 16:26:56 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.24 2009/03/14 14:46:01 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.25 2011/04/24 16:26:56 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -129,7 +129,7 @@ ofcopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
if (!sc)
|
||||
return ENXIO;
|
||||
if (!(tp = sc->of_tty))
|
||||
sc->of_tty = tp = ttymalloc();
|
||||
sc->of_tty = tp = tty_alloc();
|
||||
tp->t_oproc = ofcstart;
|
||||
tp->t_param = ofcparam;
|
||||
tp->t_dev = dev;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uart.c,v 1.6 2009/11/21 17:40:27 rmind Exp $ */
|
||||
/* $NetBSD: uart.c,v 1.7 2011/04/24 16:26:56 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uart.c,v 1.6 2009/11/21 17:40:27 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uart.c,v 1.7 2011/04/24 16:26:56 rmind Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -145,7 +145,7 @@ uart_attach(struct device *parent, struct device *self, void *aux)
|
||||
maj = cdevsw_lookup_major(&uart_cdevsw);
|
||||
minor = sc->sc_dev.dv_unit;
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = uart_start;
|
||||
tp->t_param = uart_param;
|
||||
sc->sc_tty = tp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbjcn.c,v 1.26 2011/02/01 06:13:08 matt Exp $ */
|
||||
/* $NetBSD: sbjcn.c,v 1.27 2011/04/24 16:26:56 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000, 2001
|
||||
@ -103,7 +103,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbjcn.c,v 1.26 2011/02/01 06:13:08 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbjcn.c,v 1.27 2011/04/24 16:26:56 rmind Exp $");
|
||||
|
||||
#define SBJCN_DEBUG
|
||||
|
||||
@ -304,7 +304,7 @@ sbjcn_attach_channel(struct sbjcn_softc *sc, int chan, int intr)
|
||||
SET(ch->ch_swflags, TIOCFLAG_SOFTCAR);
|
||||
}
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = sbjcn_start;
|
||||
tp->t_param = sbjcn_param;
|
||||
tp->t_hwiflow = sbjcn_hwiflow;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbscn.c,v 1.34 2011/02/20 07:47:39 matt Exp $ */
|
||||
/* $NetBSD: sbscn.c,v 1.35 2011/04/24 16:26:56 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000, 2001
|
||||
@ -109,7 +109,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.34 2011/02/20 07:47:39 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbscn.c,v 1.35 2011/04/24 16:26:56 rmind Exp $");
|
||||
|
||||
#define SBSCN_DEBUG
|
||||
|
||||
@ -335,7 +335,7 @@ sbscn_attach_channel(struct sbscn_softc *sc, int chan, int intr)
|
||||
SET(ch->ch_swflags, TIOCFLAG_SOFTCAR);
|
||||
}
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = sbscn_start;
|
||||
tp->t_param = sbscn_param;
|
||||
tp->t_hwiflow = sbscn_hwiflow;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scn.c,v 1.2 2009/11/21 17:40:28 rmind Exp $ */
|
||||
/* $NetBSD: scn.c,v 1.3 2011/04/24 16:26:57 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Resurrected from the old pc532 port 1/18/2009.
|
||||
@ -92,7 +92,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.2 2009/11/21 17:40:28 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.3 2011/04/24 16:26:57 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -1081,7 +1081,7 @@ scnopen(dev_t dev, int flags, int mode, struct lwp *l)
|
||||
|
||||
tp = sc->sc_tty;
|
||||
if (!tp) {
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
sc->sc_tty = sc->sc_duart->chan[sc->sc_channel].tty = tp;
|
||||
tty_attach(tp);
|
||||
}
|
||||
@ -1191,7 +1191,7 @@ scnclose(dev_t dev, int flags, int mode, struct lwp *l)
|
||||
|
||||
#if 0
|
||||
if ((tp->t_state & TS_ISOPEN) == 0) {
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
sc->sc_tty = (struct tty *) NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sci.c,v 1.52 2009/03/14 15:36:13 dsl Exp $ */
|
||||
/* $NetBSD: sci.c,v 1.53 2011/04/24 16:26:57 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved.
|
||||
@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.52 2009/03/14 15:36:13 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.53 2011/04/24 16:26:57 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
#include "opt_sci.h"
|
||||
@ -402,7 +402,7 @@ sci_attach(struct device *parent, struct device *self, void *aux)
|
||||
sc->sc_si = softint_establish(SOFTINT_SERIAL, scisoft, sc);
|
||||
SET(sc->sc_hwflags, SCI_HW_DEV_OK);
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = scistart;
|
||||
tp->t_param = sciparam;
|
||||
tp->t_hwiflow = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scif.c,v 1.59 2009/04/05 00:22:53 uwe Exp $ */
|
||||
/* $NetBSD: scif.c,v 1.60 2011/04/24 16:26:57 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved.
|
||||
@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.59 2009/04/05 00:22:53 uwe Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.60 2011/04/24 16:26:57 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
#include "opt_scif.h"
|
||||
@ -480,7 +480,7 @@ scif_attach(device_t parent, device_t self, void *aux)
|
||||
sc->sc_si = softint_establish(SOFTINT_SERIAL, scifsoft, sc);
|
||||
SET(sc->sc_hwflags, SCIF_HW_DEV_OK);
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = scifstart;
|
||||
tp->t_param = scifparam;
|
||||
tp->t_hwiflow = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kd.c,v 1.48 2008/04/28 20:23:35 martin Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.49 2011/04/24 16:26:57 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.48 2008/04/28 20:23:35 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.49 2011/04/24 16:26:57 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
#include "fb.h"
|
||||
@ -123,7 +123,7 @@ kd_init(struct kd_softc *kd)
|
||||
{
|
||||
struct tty *tp;
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
callout_setfunc(&tp->t_rstrt_ch, kd_later, tp);
|
||||
tp->t_oproc = kdstart;
|
||||
tp->t_param = kdparam;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kd.c,v 1.49 2008/04/28 20:23:36 martin Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.50 2011/04/24 16:26:57 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.49 2008/04/28 20:23:36 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.50 2011/04/24 16:26:57 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -119,7 +119,7 @@ kd_init(struct kd_softc *kd)
|
||||
|
||||
kd = &kd_softc; /* XXX */
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
callout_setfunc(&tp->t_rstrt_ch, kd_later, tp);
|
||||
tp->t_oproc = kdstart;
|
||||
tp->t_param = kdparam;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcons.c,v 1.29 2008/06/13 13:10:49 cegger Exp $ */
|
||||
/* $NetBSD: pcons.c,v 1.30 2011/04/24 16:26:57 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Eduardo E. Horvath
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcons.c,v 1.29 2008/06/13 13:10:49 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcons.c,v 1.30 2011/04/24 16:26:57 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -130,7 +130,7 @@ pconsopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
if (!sc)
|
||||
return ENXIO;
|
||||
if (!(tp = sc->of_tty))
|
||||
sc->of_tty = tp = ttymalloc();
|
||||
sc->of_tty = tp = tty_alloc();
|
||||
tp->t_oproc = pconsstart;
|
||||
tp->t_param = pconsparam;
|
||||
tp->t_dev = dev;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sab.c,v 1.45 2010/03/11 04:19:56 mrg Exp $ */
|
||||
/* $NetBSD: sab.c,v 1.46 2011/04/24 16:26:57 rmind Exp $ */
|
||||
/* $OpenBSD: sab.c,v 1.7 2002/04/08 17:49:42 jason Exp $ */
|
||||
|
||||
/*
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.45 2010/03/11 04:19:56 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.46 2011/04/24 16:26:57 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
#include <sys/types.h>
|
||||
@ -384,7 +384,7 @@ sabtty_attach(struct device *parent, struct device *self, void *aux)
|
||||
#endif
|
||||
|
||||
if (!is_kgdb) {
|
||||
sc->sc_tty = ttymalloc();
|
||||
sc->sc_tty = tty_alloc();
|
||||
if (sc->sc_tty == NULL) {
|
||||
aprint_normal(": failed to allocate tty\n");
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kd.c,v 1.21 2008/04/28 20:23:37 martin Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.22 2011/04/24 16:26:58 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.21 2008/04/28 20:23:37 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.22 2011/04/24 16:26:58 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -128,7 +128,7 @@ kd_init(struct kd_softc *kd)
|
||||
|
||||
kd = &kd_softc; /* XXX */
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
callout_setfunc(&tp->t_rstrt_ch, kd_later, tp);
|
||||
tp->t_oproc = kdstart;
|
||||
tp->t_param = kdparam;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcons.c,v 1.19 2008/07/06 13:29:50 tsutsui Exp $ */
|
||||
/* $NetBSD: pcons.c,v 1.20 2011/04/24 16:26:58 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Eduardo E. Horvath
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcons.c,v 1.19 2008/07/06 13:29:50 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pcons.c,v 1.20 2011/04/24 16:26:58 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -126,7 +126,7 @@ pconsopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
if ((tp = sc->of_tty) == NULL)
|
||||
sc->of_tty = tp = ttymalloc();
|
||||
sc->of_tty = tp = tty_alloc();
|
||||
tp->t_oproc = pconsstart;
|
||||
tp->t_param = pconsparam;
|
||||
tp->t_dev = dev;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kd.c,v 1.55 2008/04/28 20:23:37 martin Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.56 2011/04/24 16:26:58 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.55 2008/04/28 20:23:37 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.56 2011/04/24 16:26:58 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -108,7 +108,7 @@ kd_init(struct kd_softc *kd)
|
||||
{
|
||||
struct tty *tp;
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
callout_setfunc(&tp->t_rstrt_ch, kd_later, tp);
|
||||
|
||||
tp->t_oproc = kdstart;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gencons.c,v 1.51 2010/12/14 23:44:49 matt Exp $ */
|
||||
/* $NetBSD: gencons.c,v 1.52 2011/04/24 16:26:58 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Gordon W. Ross
|
||||
@ -36,7 +36,7 @@
|
||||
/* All bugs are subject to removal without further notice */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gencons.c,v 1.51 2010/12/14 23:44:49 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gencons.c,v 1.52 2011/04/24 16:26:58 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_cputype.h"
|
||||
@ -102,7 +102,7 @@ gencnopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
return ENXIO;
|
||||
|
||||
if (gc_softc[unit].gencn_tty == NULL)
|
||||
gc_softc[unit].gencn_tty = ttymalloc();
|
||||
gc_softc[unit].gencn_tty = tty_alloc();
|
||||
|
||||
gc_softc[unit].alive = 1;
|
||||
gc_softc[unit].unit = unit;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com.c,v 1.56 2009/11/23 00:11:45 rmind Exp $ */
|
||||
/* $NetBSD: com.c,v 1.57 2011/04/24 16:26:58 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.56 2009/11/23 00:11:45 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.57 2011/04/24 16:26:58 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -393,7 +393,7 @@ comopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
return ENXIO;
|
||||
|
||||
if (!sc->sc_tty) {
|
||||
tp = sc->sc_tty = ttymalloc();
|
||||
tp = sc->sc_tty = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = sc->sc_tty;
|
||||
@ -528,7 +528,7 @@ comclose(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
ttyclose(tp);
|
||||
#ifdef notyet /* XXXX */
|
||||
if (unit != comconsole) {
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
sc->sc_tty = 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ite.c,v 1.58 2011/02/08 20:20:25 rmind Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.59 2011/04/24 16:26:58 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.58 2011/02/08 20:20:25 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.59 2011/04/24 16:26:58 rmind Exp $");
|
||||
|
||||
#include "ite.h"
|
||||
#if NITE > 0
|
||||
@ -352,7 +352,7 @@ iteopen(dev_t dev, int mode, int devtype, struct lwp *l)
|
||||
if (unit >= ite_cd.cd_ndevs || (ip = getitesp(dev)) == NULL)
|
||||
return (ENXIO);
|
||||
if (!ite_tty[unit]) {
|
||||
tp = ite_tty[unit] = ttymalloc();
|
||||
tp = ite_tty[unit] = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = ite_tty[unit];
|
||||
@ -396,7 +396,7 @@ iteclose(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
ttyclose(tp);
|
||||
iteoff(dev, 0);
|
||||
#if 0
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
ite_tty[UNIT(dev)] = (struct tty *)0;
|
||||
#endif
|
||||
return(0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xencons.c,v 1.35 2009/10/23 02:32:34 snj Exp $ */
|
||||
/* $NetBSD: xencons.c,v 1.36 2011/04/24 16:26:51 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Manuel Bouyer.
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.35 2009/10/23 02:32:34 snj Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.36 2011/04/24 16:26:51 rmind Exp $");
|
||||
|
||||
#include "opt_xen.h"
|
||||
|
||||
@ -161,7 +161,7 @@ xencons_attach(device_t parent, device_t self, void *aux)
|
||||
aprint_normal(": Xen Virtual Console Driver\n");
|
||||
|
||||
sc->sc_dev = self;
|
||||
sc->sc_tty = ttymalloc();
|
||||
sc->sc_tty = tty_alloc();
|
||||
tty_attach(sc->sc_tty);
|
||||
sc->sc_tty->t_oproc = xencons_start;
|
||||
sc->sc_tty->t_param = xencons_param;
|
||||
@ -249,7 +249,7 @@ xencons_close(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
#ifdef notyet /* XXX */
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: arcbios_tty.c,v 1.21 2011/02/20 08:02:46 matt Exp $ */
|
||||
/* $NetBSD: arcbios_tty.c,v 1.22 2011/04/24 16:26:59 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: arcbios_tty.c,v 1.21 2011/02/20 08:02:46 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: arcbios_tty.c,v 1.22 2011/04/24 16:26:59 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/uio.h>
|
||||
@ -87,7 +87,7 @@ arcbios_ttyopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
s = spltty();
|
||||
|
||||
if (arcbios_tty[unit] == NULL) {
|
||||
tp = arcbios_tty[unit] = ttymalloc();
|
||||
tp = arcbios_tty[unit] = tty_alloc();
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = arcbios_tty[unit];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dz.c,v 1.39 2010/05/09 22:29:26 hans Exp $ */
|
||||
/* $NetBSD: dz.c,v 1.40 2011/04/24 16:26:59 rmind Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.39 2010/05/09 22:29:26 hans Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.40 2011/04/24 16:26:59 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -209,7 +209,7 @@ dzattach(struct dz_softc *sc, struct evcnt *parent_evcnt, int consline)
|
||||
for (n = 0; n < sc->sc_type; n++) {
|
||||
sc->sc_dz[n].dz_sc = sc;
|
||||
sc->sc_dz[n].dz_line = n;
|
||||
sc->sc_dz[n].dz_tty = ttymalloc();
|
||||
sc->sc_dz[n].dz_tty = tty_alloc();
|
||||
}
|
||||
|
||||
evcnt_attach_dynamic(&sc->sc_rintrcnt, EVCNT_TYPE_INTR, parent_evcnt,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd18xx.c,v 1.27 2009/03/14 15:36:17 dsl Exp $ */
|
||||
/* $NetBSD: cd18xx.c,v 1.28 2011/04/24 16:26:59 rmind Exp $ */
|
||||
|
||||
/* XXXad does this even compile? */
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cd18xx.c,v 1.27 2009/03/14 15:36:17 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cd18xx.c,v 1.28 2011/04/24 16:26:59 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -328,7 +328,7 @@ cdtty_attach(struct cd18xx_softc *sc, int port)
|
||||
/* XXX no console or kgdb support yet! */
|
||||
|
||||
/* get a tty structure */
|
||||
p->p_tty = ttymalloc();
|
||||
p->p_tty = tty_alloc();
|
||||
p->p_tty->t_oproc = cdttystart;
|
||||
p->p_tty->t_param = cdttyparam;
|
||||
p->p_tty->t_hwiflow = cdttyhwiflow;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clmpcc.c,v 1.43 2009/11/23 02:13:46 rmind Exp $ */
|
||||
/* $NetBSD: clmpcc.c,v 1.44 2011/04/24 16:26:59 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clmpcc.c,v 1.43 2009/11/23 02:13:46 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clmpcc.c,v 1.44 2011/04/24 16:26:59 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -288,7 +288,7 @@ clmpcc_attach(struct clmpcc_softc *sc)
|
||||
ch->ch_sc = sc;
|
||||
ch->ch_car = chan;
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = clmpcc_start;
|
||||
tp->t_param = clmpcc_param;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com.c,v 1.299 2011/01/22 16:59:26 tsutsui Exp $ */
|
||||
/* $NetBSD: com.c,v 1.300 2011/04/24 16:26:59 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.299 2011/01/22 16:59:26 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.300 2011/04/24 16:26:59 rmind Exp $");
|
||||
|
||||
#include "opt_com.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -501,7 +501,7 @@ fifodelay:
|
||||
|
||||
fifodone:
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = comstart;
|
||||
tp->t_param = comparam;
|
||||
tp->t_hwiflow = comhwiflow;
|
||||
@ -670,7 +670,7 @@ com_detach(device_t self, int flags)
|
||||
* Ring buffer allocation failed in the com_attach_subr,
|
||||
* only the tty is allocated, and nothing else.
|
||||
*/
|
||||
ttyfree(sc->sc_tty);
|
||||
tty_free(sc->sc_tty);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -679,7 +679,7 @@ com_detach(device_t self, int flags)
|
||||
|
||||
/* Detach and free the tty. */
|
||||
tty_detach(sc->sc_tty);
|
||||
ttyfree(sc->sc_tty);
|
||||
tty_free(sc->sc_tty);
|
||||
|
||||
/* Unhook the soft interrupt handler. */
|
||||
softint_disestablish(sc->sc_si);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cy.c,v 1.57 2009/11/23 02:13:46 rmind Exp $ */
|
||||
/* $NetBSD: cy.c,v 1.58 2011/04/24 16:27:00 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* cy.c
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.57 2009/11/23 02:13:46 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.58 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -290,7 +290,7 @@ cyopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
|
||||
s = spltty();
|
||||
if (cy->cy_tty == NULL) {
|
||||
if ((cy->cy_tty = ttymalloc()) == NULL) {
|
||||
if ((cy->cy_tty = tty_alloc()) == NULL) {
|
||||
splx(s);
|
||||
aprint_error_dev(sc->sc_dev,
|
||||
"port %d: can't allocate tty\n",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: z8530tty.c,v 1.127 2009/05/22 03:51:30 mrg Exp $ */
|
||||
/* $NetBSD: z8530tty.c,v 1.128 2011/04/24 16:27:00 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999
|
||||
@ -137,7 +137,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.127 2009/05/22 03:51:30 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.128 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
#include "opt_ntp.h"
|
||||
@ -390,7 +390,7 @@ zstty_attach(device_t parent, device_t self, void *aux)
|
||||
#endif
|
||||
aprint_normal("\n");
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_dev = dev;
|
||||
tp->t_oproc = zsstart;
|
||||
tp->t_param = zsparam;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gtmpsc.c,v 1.42 2010/11/14 03:49:53 uebayasi Exp $ */
|
||||
/* $NetBSD: gtmpsc.c,v 1.43 2011/04/24 16:27:00 rmind Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2009 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.42 2010/11/14 03:49:53 uebayasi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.43 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
@ -328,7 +328,7 @@ gtmpscattach(device_t parent, device_t self, void *aux)
|
||||
gtmpsc_txdesc_init(sc);
|
||||
gtmpsc_rxdesc_init(sc);
|
||||
|
||||
sc->sc_tty = tp = ttymalloc();
|
||||
sc->sc_tty = tp = tty_alloc();
|
||||
tp->t_oproc = gtmpscstart;
|
||||
tp->t_param = gtmpscparam;
|
||||
tty_attach(tp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nullcons_subr.c,v 1.10 2009/11/23 02:13:45 rmind Exp $ */
|
||||
/* $NetBSD: nullcons_subr.c,v 1.11 2011/04/24 16:26:59 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nullcons_subr.c,v 1.10 2009/11/23 02:13:45 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nullcons_subr.c,v 1.11 2011/04/24 16:26:59 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -160,7 +160,7 @@ nullcons_newdev(struct consdev *cn)
|
||||
/*
|
||||
* Allocate tty (mostly to have sane ioctl()).
|
||||
*/
|
||||
nulltty = ttymalloc();
|
||||
nulltty = tty_alloc();
|
||||
nulltty->t_dev = makedev(cmajor, 0);
|
||||
tty_attach(nulltty);
|
||||
cn->cn_dev = nulltty->t_dev;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ofcons.c,v 1.41 2009/05/29 20:10:39 rjs Exp $ */
|
||||
/* $NetBSD: ofcons.c,v 1.42 2011/04/24 16:27:00 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.41 2009/05/29 20:10:39 rjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.42 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -122,7 +122,7 @@ ofcons_open(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
if (!sc)
|
||||
return ENXIO;
|
||||
if (!(tp = sc->of_tty))
|
||||
sc->of_tty = tp = ttymalloc();
|
||||
sc->of_tty = tp = tty_alloc();
|
||||
tp->t_oproc = ofcons_start;
|
||||
tp->t_param = ofcons_param;
|
||||
tp->t_dev = dev;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cz.c,v 1.54 2010/07/26 22:33:24 jym Exp $ */
|
||||
/* $NetBSD: cz.c,v 1.55 2011/04/24 16:27:00 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Zembu Labs, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cz.c,v 1.54 2010/07/26 22:33:24 jym Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cz.c,v 1.55 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -412,7 +412,7 @@ cz_attach(device_t parent, device_t self, void *aux)
|
||||
|
||||
callout_init(&sc->sc_diag_ch, 0);
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_dev = makedev(cdevsw_lookup_major(&cz_cdevsw),
|
||||
(device_unit(&cz->cz_dev) * ZFIRM_MAX_CHANNELS) + i);
|
||||
tp->t_oproc = czttystart;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dhu.c,v 1.55 2008/06/11 17:27:59 drochner Exp $ */
|
||||
/* $NetBSD: dhu.c,v 1.56 2011/04/24 16:27:00 rmind Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003, Hugh Graham.
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -68,7 +68,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.55 2008/06/11 17:27:59 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.56 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -287,7 +287,8 @@ dhu_attach(device_t parent, device_t self, void *aux)
|
||||
|
||||
for (i = 0; i < sc->sc_lines; i++) {
|
||||
struct tty *tp;
|
||||
tp = sc->sc_dhu[i].dhu_tty = ttymalloc();
|
||||
|
||||
tp = sc->sc_dhu[i].dhu_tty = tty_alloc();
|
||||
sc->sc_dhu[i].dhu_state = STATE_IDLE;
|
||||
bus_dmamap_create(sc->sc_dmat, tp->t_outq.c_cn, 1,
|
||||
tp->t_outq.c_cn, 0, BUS_DMA_ALLOCNOW|BUS_DMA_NOWAIT,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dl.c,v 1.45 2009/05/12 14:43:33 cegger Exp $ */
|
||||
/* $NetBSD: dl.c,v 1.46 2011/04/24 16:27:00 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
@ -104,7 +104,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.45 2009/05/12 14:43:33 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.46 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -244,7 +244,7 @@ dl_attach (device_t parent, device_t self, void *aux)
|
||||
|
||||
/* Initialize our softc structure. Should be done in open? */
|
||||
|
||||
sc->sc_tty = ttymalloc();
|
||||
sc->sc_tty = tty_alloc();
|
||||
tty_attach(sc->sc_tty);
|
||||
|
||||
/* Now register the TX & RX interrupt handlers */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: qd.c,v 1.51 2010/11/13 13:52:10 uebayasi Exp $ */
|
||||
/* $NetBSD: qd.c,v 1.52 2011/04/24 16:27:00 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
@ -58,7 +58,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.51 2010/11/13 13:52:10 uebayasi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.52 2011/04/24 16:27:00 rmind Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -826,7 +826,7 @@ qdopen(dev_t dev, int flag, int mode, struct proc *p)
|
||||
|
||||
/* If not done already, allocate tty structure */
|
||||
if (qd_tty[minor_dev] == NULL)
|
||||
qd_tty[minor_dev] = ttymalloc();
|
||||
qd_tty[minor_dev] = tty_alloc();
|
||||
|
||||
if (qd_tty[minor_dev] == NULL)
|
||||
return ENXIO;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: magma.c,v 1.54 2009/09/17 16:39:48 tsutsui Exp $ */
|
||||
/* $NetBSD: magma.c,v 1.55 2011/04/24 16:27:01 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 Iain Hibbert
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.54 2009/09/17 16:39:48 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.55 2011/04/24 16:27:01 rmind Exp $");
|
||||
|
||||
#if 0
|
||||
#define MAGMA_DEBUG
|
||||
@ -842,8 +842,10 @@ mtty_attach(device_t parent, device_t dev, void *args)
|
||||
chan = 1; /* skip channel 0 if parmode */
|
||||
mp->mp_channel = chan;
|
||||
|
||||
tp = ttymalloc();
|
||||
if (tp == NULL) break;
|
||||
tp = tty_alloc();
|
||||
if (tp == NULL) {
|
||||
break;
|
||||
}
|
||||
tty_attach(tp);
|
||||
tp->t_oproc = mtty_start;
|
||||
tp->t_param = mtty_param;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: spif.c,v 1.25 2009/09/19 11:58:06 tsutsui Exp $ */
|
||||
/* $NetBSD: spif.c,v 1.26 2011/04/24 16:27:01 rmind Exp $ */
|
||||
/* $OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $ */
|
||||
|
||||
/*
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.25 2009/09/19 11:58:06 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.26 2011/04/24 16:27:01 rmind Exp $");
|
||||
|
||||
#include "spif.h"
|
||||
#if NSPIF > 0
|
||||
@ -288,7 +288,7 @@ stty_attach(device_t parent, device_t dev, void *aux)
|
||||
|
||||
DTR_WRITE(sc, port, 0);
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
|
||||
tp->t_oproc = stty_start;
|
||||
tp->t_param = stty_param;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ucom.c,v 1.86 2010/11/30 15:26:22 bsh Exp $ */
|
||||
/* $NetBSD: ucom.c,v 1.87 2011/04/24 16:27:01 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.86 2010/11/30 15:26:22 bsh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.87 2011/04/24 16:27:01 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -237,7 +237,7 @@ ucom_attach(device_t parent, device_t self, void *aux)
|
||||
|
||||
sc->sc_si = softint_establish(SOFTINT_NET, ucom_softintr, sc);
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = ucomstart;
|
||||
tp->t_param = ucomparam;
|
||||
tp->t_hwiflow = ucomhwiflow;
|
||||
@ -305,7 +305,7 @@ ucom_detach(device_t self, int flags)
|
||||
/* Detach and free the tty. */
|
||||
if (tp != NULL) {
|
||||
tty_detach(tp);
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
sc->sc_tty = NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ucycom.c,v 1.32 2010/11/15 06:01:07 uebayasi Exp $ */
|
||||
/* $NetBSD: ucycom.c,v 1.33 2011/04/24 16:27:01 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.32 2010/11/15 06:01:07 uebayasi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.33 2011/04/24 16:27:01 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -212,7 +212,7 @@ ucycom_attach(device_t parent, device_t self, void *aux)
|
||||
sc->sc_msr = sc->sc_mcr = 0;
|
||||
|
||||
/* set up tty */
|
||||
sc->sc_tty = ttymalloc();
|
||||
sc->sc_tty = tty_alloc();
|
||||
sc->sc_tty->t_sc = sc;
|
||||
sc->sc_tty->t_oproc = ucycomstart;
|
||||
sc->sc_tty->t_param = ucycomparam;
|
||||
@ -263,7 +263,7 @@ ucycom_detach(device_t self, int flags)
|
||||
if (tp != NULL) {
|
||||
DPRINTF(("ucycom_detach: tty_detach %p\n", tp));
|
||||
tty_detach(tp);
|
||||
ttyfree(tp);
|
||||
tty_free(tp);
|
||||
sc->sc_tty = NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uhso.c,v 1.4 2011/03/16 21:36:55 plunky Exp $ */
|
||||
/* $NetBSD: uhso.c,v 1.5 2011/04/24 16:27:01 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009 Iain Hibbert
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.4 2011/03/16 21:36:55 plunky Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.5 2011/04/24 16:27:01 rmind Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
@ -1323,7 +1323,7 @@ uhso_tty_attach(struct uhso_port *hp)
|
||||
{
|
||||
struct tty *tp;
|
||||
|
||||
tp = ttymalloc();
|
||||
tp = tty_alloc();
|
||||
tp->t_oproc = uhso_tty_start;
|
||||
tp->t_param = uhso_tty_param;
|
||||
|
||||
@ -1342,7 +1342,7 @@ uhso_tty_detach(struct uhso_port *hp)
|
||||
uhso_tty_clean(hp);
|
||||
|
||||
tty_detach(hp->hp_tp);
|
||||
ttyfree(hp->hp_tp);
|
||||
tty_free(hp->hp_tp);
|
||||
hp->hp_tp = NULL;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wsdisplay.c,v 1.133 2010/04/11 14:04:10 drochner Exp $ */
|
||||
/* $NetBSD: wsdisplay.c,v 1.134 2011/04/24 16:27:01 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.133 2010/04/11 14:04:10 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.134 2011/04/24 16:27:01 rmind Exp $");
|
||||
|
||||
#include "opt_wsdisplay_compat.h"
|
||||
#include "opt_wsmsgattrs.h"
|
||||
@ -289,7 +289,7 @@ wsscreen_attach(struct wsdisplay_softc *sc, int console, const char *emul,
|
||||
|
||||
scr->scr_dconf = dconf;
|
||||
|
||||
scr->scr_tty = ttymalloc();
|
||||
scr->scr_tty = tty_alloc();
|
||||
tty_attach(scr->scr_tty);
|
||||
scr->scr_hold_screen = 0;
|
||||
if (WSSCREEN_HAS_EMULATOR(scr))
|
||||
@ -312,7 +312,7 @@ wsscreen_detach(struct wsscreen *scr)
|
||||
|
||||
if (WSSCREEN_HAS_TTY(scr)) {
|
||||
tty_detach(scr->scr_tty);
|
||||
ttyfree(scr->scr_tty);
|
||||
tty_free(scr->scr_tty);
|
||||
}
|
||||
if (WSSCREEN_HAS_EMULATOR(scr)) {
|
||||
(*scr->scr_dconf->wsemul->detach)(scr->scr_dconf->wsemulcookie,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tty.c,v 1.243 2011/04/09 06:34:06 martin Exp $ */
|
||||
/* $NetBSD: tty.c,v 1.244 2011/04/24 16:26:51 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -63,7 +63,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.243 2011/04/09 06:34:06 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.244 2011/04/24 16:26:51 rmind Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -2637,10 +2637,10 @@ ttysleep(struct tty *tp, kcondvar_t *cv, bool catch, int timo)
|
||||
* This should be called ONLY once per real tty (including pty's).
|
||||
* eg, on the sparc, the keyboard and mouse have struct tty's that are
|
||||
* distinctly NOT usable as tty's, and thus should not be attached to
|
||||
* the ttylist. This is why this call is not done from ttymalloc().
|
||||
* the ttylist. This is why this call is not done from tty_alloc().
|
||||
*
|
||||
* Device drivers should attach tty's at a similar time that they are
|
||||
* ttymalloc()'ed, or, for the case of statically allocated struct tty's
|
||||
* allocated, or, for the case of statically allocated struct tty's
|
||||
* either in the attach or (first) open routine.
|
||||
*/
|
||||
void
|
||||
@ -2674,10 +2674,10 @@ tty_detach(struct tty *tp)
|
||||
* Allocate a tty structure and its associated buffers.
|
||||
*/
|
||||
struct tty *
|
||||
ttymalloc(void)
|
||||
tty_alloc(void)
|
||||
{
|
||||
struct tty *tp;
|
||||
int i;
|
||||
struct tty *tp;
|
||||
int i;
|
||||
|
||||
tp = kmem_zalloc(sizeof(*tp), KM_SLEEP);
|
||||
callout_init(&tp->t_rstrt_ch, 0);
|
||||
@ -2698,9 +2698,11 @@ ttymalloc(void)
|
||||
tp->t_dev = NODEV;
|
||||
selinit(&tp->t_rsel);
|
||||
selinit(&tp->t_wsel);
|
||||
for (i = 0; i < TTYSIG_COUNT; i++)
|
||||
for (i = 0; i < TTYSIG_COUNT; i++) {
|
||||
sigemptyset(&tp->t_sigs[i]);
|
||||
return (tp);
|
||||
}
|
||||
|
||||
return tp;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2710,7 +2712,7 @@ ttymalloc(void)
|
||||
* tty_attach()ed.
|
||||
*/
|
||||
void
|
||||
ttyfree(struct tty *tp)
|
||||
tty_free(struct tty *tp)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tty_pty.c,v 1.127 2011/04/09 12:07:06 martin Exp $ */
|
||||
/* $NetBSD: tty_pty.c,v 1.128 2011/04/24 16:26:51 rmind Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.127 2011/04/09 12:07:06 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.128 2011/04/24 16:26:51 rmind Exp $");
|
||||
|
||||
#include "opt_ptm.h"
|
||||
|
||||
@ -248,7 +248,7 @@ pty_check(int ptn)
|
||||
|
||||
selinit(&pti->pt_selr);
|
||||
selinit(&pti->pt_selw);
|
||||
pti->pt_tty = ttymalloc();
|
||||
pti->pt_tty = tty_alloc();
|
||||
|
||||
mutex_enter(&pt_softc_mutex);
|
||||
|
||||
@ -258,7 +258,7 @@ pty_check(int ptn)
|
||||
*/
|
||||
if (pt_softc[ptn]) {
|
||||
mutex_exit(&pt_softc_mutex);
|
||||
ttyfree(pti->pt_tty);
|
||||
tty_free(pti->pt_tty);
|
||||
seldestroy(&pti->pt_selr);
|
||||
seldestroy(&pti->pt_selw);
|
||||
kmem_free(pti, sizeof(*pti));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tty.h,v 1.86 2009/01/22 20:40:20 drochner Exp $ */
|
||||
/* $NetBSD: tty.h,v 1.87 2011/04/24 16:26:52 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -289,8 +289,8 @@ void tty_attach(struct tty *);
|
||||
void tty_detach(struct tty *);
|
||||
void tty_init(void);
|
||||
struct tty
|
||||
*ttymalloc(void);
|
||||
void ttyfree(struct tty *);
|
||||
*tty_alloc(void);
|
||||
void tty_free(struct tty *);
|
||||
u_char *firstc(struct clist *, int *);
|
||||
bool ttypull(struct tty *);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user