aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/zs
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-09-18 16:43:44 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-09-18 16:43:44 +0000
commit9e51d6f15d0a9ec140bb23cc08cfbecefa81b400 (patch)
tree44f51db043f470de8c6086679fd232cc8bbae5b0 /sys/dev/zs
parent3d4fc5c73fcf60d69038f7af493a0c1bf97adc2d (diff)
downloadsrc-9e51d6f15d0a9ec140bb23cc08cfbecefa81b400.tar.gz
src-9e51d6f15d0a9ec140bb23cc08cfbecefa81b400.zip
Use tty->t_sc to find out softc.
Notes
Notes: svn path=/head/; revision=135429
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 ab3eb339e575..b79060be2c95 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);