diff options
author | Peter Wemm <peter@FreeBSD.org> | 2001-02-19 04:53:55 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2001-02-19 04:53:55 +0000 |
commit | 9fc8e6130499874407be0907ab5462294b9961e5 (patch) | |
tree | 8fca24e50d6aa70479780b37d342cf444a01d3a6 /sys/dev/si/si.c | |
parent | 68f4fced955b584c59532b8dbe689639e061b1fa (diff) | |
download | src-9fc8e6130499874407be0907ab5462294b9961e5.tar.gz src-9fc8e6130499874407be0907ab5462294b9961e5.zip |
Notes
Diffstat (limited to 'sys/dev/si/si.c')
-rw-r--r-- | sys/dev/si/si.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 753849bf496c..615c6d8a00f5 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -140,8 +140,6 @@ static int si_debug = 0; /* data, not bss, so it's patchable */ SYSCTL_INT(_machdep, OID_AUTO, si_debug, CTLFLAG_RW, &si_debug, 0, ""); -static struct tty *si__tty; - static int si_numunits; devclass_t si_devclass; @@ -253,7 +251,6 @@ siattach(device_t dev) volatile struct si_reg *regp; volatile caddr_t maddr; struct si_module *modp; - struct tty *tp; struct speedtab *spt; int nmodule, nport, x, y; int uart_type; @@ -500,7 +497,6 @@ try_next: sc->sc_ports = (struct si_port *)malloc(sizeof(struct si_port) * nport, M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->sc_ports == 0) { -mem_fail: printf("si%d: fail to malloc memory for port structs\n", unit); return EINVAL; @@ -508,15 +504,6 @@ mem_fail: sc->sc_nport = nport; /* - * allocate tty structures for ports - */ - tp = (struct tty *)malloc(sizeof(*tp) * nport, M_DEVBUF, - M_NOWAIT | M_ZERO); - if (tp == 0) - goto mem_fail; - si__tty = tp; - - /* * Scan round the ports again, this time initialising. */ pp = sc->sc_ports; @@ -558,7 +545,7 @@ mem_fail: for (x = 0; x < nport; x++, pp++, ccbp++) { pp->sp_ccb = ccbp; /* save the address */ - pp->sp_tty = tp++; + pp->sp_tty = ttymalloc(NULL); pp->sp_pend = IDLE_CLOSE; pp->sp_state = 0; /* internal flag */ pp->sp_dtr_wait = 3 * hz; |