diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 2000-12-04 22:46:50 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 2000-12-04 22:46:50 +0000 |
| commit | 031fc810abd6b2e6e7ca1c5dca1e30b0816a0558 (patch) | |
| tree | 666e0b4d2fded5ac285854eee39002f92f92a93a /sys/dev | |
| parent | b884490bc006964586812376b22661a7c18fa136 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/dc/if_dc.c | 5 | ||||
| -rw-r--r-- | sys/dev/sf/if_sf.c | 4 | ||||
| -rw-r--r-- | sys/dev/sk/if_sk.c | 5 | ||||
| -rw-r--r-- | sys/dev/ti/if_ti.c | 6 | ||||
| -rw-r--r-- | sys/dev/vr/if_vr.c | 5 |
5 files changed, 14 insertions, 11 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index a23706a2d8024..a07c4dc4c9347 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -1770,6 +1770,9 @@ static int dc_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct dc_softc)); + mtx_init(&sc->dc_mtx, device_get_nameunit(dev), MTX_DEF); + DC_LOCK(sc); + /* * Handle power management nonsense. */ @@ -1833,8 +1836,6 @@ static int dc_attach(dev) goto fail; } - mtx_init(&sc->dc_mtx, device_get_nameunit(dev), MTX_DEF); - DC_LOCK(sc); /* Need this info to decide on a chip type. */ sc->dc_info = dc_devtype(dev); revision = pci_read_config(dev, DC_PCI_CFRV, 4) & 0x000000FF; diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index f2ca1e8bd922e..aa33e7d96fcde 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -679,6 +679,8 @@ static int sf_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct sf_softc)); + mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_DEF); + SF_LOCK(sc); /* * Handle power management nonsense. */ @@ -765,8 +767,6 @@ static int sf_attach(dev) } callout_handle_init(&sc->sf_stat_ch); - mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_DEF); - SF_LOCK(sc); /* Reset the adapter. */ sf_reset(sc); diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index befe974b72f11..143c4e46d3201 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -1194,6 +1194,9 @@ static int sk_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct sk_softc)); + mtx_init(&sc->sk_mtx, device_get_nameunit(dev), MTX_DEF); + SK_LOCK(sc); + /* * Handle power management nonsense. */ @@ -1279,8 +1282,6 @@ static int sk_attach(dev) goto fail; } - mtx_init(&sc->sk_mtx, device_get_nameunit(dev), MTX_DEF); - SK_LOCK(sc); /* Reset the adapter. */ sk_reset(sc); diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 1a88f0d687f99..7f6660f5ae487 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/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)) { diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 38677fd95e044..a1fa0c0d9dea9 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -643,6 +643,9 @@ static int vr_attach(dev) unit = device_get_unit(dev); bzero(sc, sizeof(struct vr_softc *)); + mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_DEF); + VR_LOCK(sc); + /* * Handle power management nonsense. */ @@ -728,8 +731,6 @@ static int vr_attach(dev) goto fail; } - mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_DEF); - VR_LOCK(sc); /* Reset the adapter. */ vr_reset(sc); |
