summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_ti.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_ti.c')
-rw-r--r--sys/pci/if_ti.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c
index 1a88f0d..7f6660f 100644
--- a/sys/pci/if_ti.c
+++ b/sys/pci/if_ti.c
@@ -1476,6 +1476,9 @@ static int ti_attach(dev)
unit = device_get_unit(dev);
bzero(sc, sizeof(struct ti_softc));
+ mtx_init(&sc->ti_mtx, device_get_nameunit(dev), MTX_DEF);
+ TI_LOCK(sc);
+
/*
* Map control/status registers.
*/
@@ -1527,9 +1530,6 @@ static int ti_attach(dev)
goto fail;
}
- mtx_init(&sc->ti_mtx, device_get_nameunit(dev), MTX_DEF);
- TI_LOCK(sc);
-
sc->ti_unit = unit;
if (ti_chipinit(sc)) {
OpenPOWER on IntegriCloud