summaryrefslogtreecommitdiffstats
path: root/sys/dev/zs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-09-18 16:43:44 +0000
committerphk <phk@FreeBSD.org>2004-09-18 16:43:44 +0000
commit6409278aafc0b599962cbb887c44eee945954ab9 (patch)
tree44f51db043f470de8c6086679fd232cc8bbae5b0 /sys/dev/zs
parentdbc4789a66b644a5637c77e95d24304ed6a790c2 (diff)
downloadFreeBSD-src-6409278aafc0b599962cbb887c44eee945954ab9.zip
FreeBSD-src-6409278aafc0b599962cbb887c44eee945954ab9.tar.gz
Use tty->t_sc to find out softc.
Diffstat (limited to 'sys/dev/zs')
-rw-r--r--sys/dev/zs/zs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index ab3eb33..b79060b 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -263,6 +263,7 @@ zstty_attach(device_t dev)
sc->sc_oget = sc->sc_obuf;
tp = ttyalloc();
+ tp->t_sc = sc;
sc->sc_si = make_dev(&zstty_cdevsw, device_get_unit(dev),
UID_ROOT, GID_WHEEL, 0600, "%s", device_get_desc(dev));
sc->sc_si->si_drv1 = sc;
@@ -525,7 +526,7 @@ zsttystart(struct tty *tp)
struct zstty_softc *sc;
uint8_t c;
- sc = tp->t_dev->si_drv1;
+ sc = tp->t_sc;
if ((tp->t_state & TS_TBLOCK) != 0)
/* XXX clear RTS */;
@@ -582,7 +583,7 @@ zsttystop(struct tty *tp, int flag)
{
struct zstty_softc *sc;
- sc = tp->t_dev->si_drv1;
+ sc = tp->t_sc;
if ((flag & FREAD) != 0) {
/* XXX stop reading, anything to do? */;
@@ -602,7 +603,7 @@ zsttyparam(struct tty *tp, struct termios *t)
{
struct zstty_softc *sc;
- sc = tp->t_dev->si_drv1;
+ sc = tp->t_sc;
return (zstty_param(sc, tp, t));
}
@@ -612,7 +613,7 @@ zsttybreak(struct tty *tp, int brk)
{
struct zstty_softc *sc;
- sc = tp->t_dev->si_drv1;
+ sc = tp->t_sc;
if (brk)
ZS_WRITE_REG(sc, 5, ZS_READ_REG(sc, 5) | ZSWR5_BREAK);
OpenPOWER on IntegriCloud