diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-01-06 13:45:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-01-06 13:45:44 +0000 |
commit | 38595d11bcb2bea046db4f3c45e6e3393453ad30 (patch) | |
tree | 1e3ba1b5056505f20bae59a4062b22ec78b15c33 /sys/arch | |
parent | 15ccd4fe5f911400054371f9c10f51a7868f3f60 (diff) |
one tests code before one commits it. initialize ttymalloc'd struct properly.
also with mrg: use B1200 instead of 1200.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/zs.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/arch/sparc/dev/zs.c b/sys/arch/sparc/dev/zs.c index d8e50c1b397..c37e8f97041 100644 --- a/sys/arch/sparc/dev/zs.c +++ b/sys/arch/sparc/dev/zs.c @@ -279,13 +279,14 @@ zsattach(parent, dev, aux) cs->cs_unit = unit; cs->cs_speed = zs_getspeed(&addr->zs_chan[ZS_CHAN_A]); cs->cs_zc = &addr->zs_chan[ZS_CHAN_A]; - tp->t_dev = makedev(ZSMAJOR, unit); - tp->t_oproc = zsstart; - tp->t_param = zsparam; if ((ctp = zs_checkcons(sc, unit, cs)) != NULL) tp = ctp; - else + else { tp = ttymalloc(); + tp->t_dev = makedev(ZSMAJOR, unit); + tp->t_oproc = zsstart; + tp->t_param = zsparam; + } cs->cs_ttyp = tp; #ifdef KGDB if (ctp == NULL) @@ -311,13 +312,14 @@ zsattach(parent, dev, aux) cs->cs_unit = unit; cs->cs_speed = zs_getspeed(&addr->zs_chan[ZS_CHAN_B]); cs->cs_zc = &addr->zs_chan[ZS_CHAN_B]; - tp->t_dev = makedev(ZSMAJOR, unit); - tp->t_oproc = zsstart; - tp->t_param = zsparam; if ((ctp = zs_checkcons(sc, unit, cs)) != NULL) tp = ctp; - else + else { tp = ttymalloc(); + tp->t_dev = makedev(ZSMAJOR, unit); + tp->t_oproc = zsstart; + tp->t_param = zsparam; + } cs->cs_ttyp = tp; #ifdef KGDB @@ -329,7 +331,7 @@ zsattach(parent, dev, aux) /* * Mouse: tell /dev/mouse driver how to talk to us. */ - tp->t_ispeed = tp->t_ospeed = 1200; + tp->t_ispeed = tp->t_ospeed = B1200; tp->t_cflag = CS8; ms_serial(tp, zsiopen, zsiclose); ringsize = 128; |