summaryrefslogtreecommitdiffstats
path: root/sys/dev/twa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/twa')
-rw-r--r--sys/dev/twa/tw_osl_freebsd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c
index 85b3af1..f435c2c 100644
--- a/sys/dev/twa/tw_osl_freebsd.c
+++ b/sys/dev/twa/tw_osl_freebsd.c
@@ -88,8 +88,7 @@ static devclass_t twa_devclass;
static TW_INT32
twa_open(struct cdev *dev, TW_INT32 flags, TW_INT32 fmt, d_thread_t *proc)
{
- TW_INT32 unit = dev2unit(dev);
- struct twa_softc *sc = devclass_get_softc(twa_devclass, unit);
+ struct twa_softc *sc = (struct twa_softc *)(dev->si_drv1);
tw_osli_dbg_dprintf(5, sc, "entered");
sc->state |= TW_OSLI_CTLR_STATE_OPEN;
@@ -114,8 +113,7 @@ twa_open(struct cdev *dev, TW_INT32 flags, TW_INT32 fmt, d_thread_t *proc)
static TW_INT32
twa_close(struct cdev *dev, TW_INT32 flags, TW_INT32 fmt, d_thread_t *proc)
{
- TW_INT32 unit = dev2unit(dev);
- struct twa_softc *sc = devclass_get_softc(twa_devclass, unit);
+ struct twa_softc *sc = (struct twa_softc *)(dev->si_drv1);
tw_osli_dbg_dprintf(5, sc, "entered");
sc->state &= ~TW_OSLI_CTLR_STATE_OPEN;
OpenPOWER on IntegriCloud