diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 3 | ||||
-rw-r--r-- | sys/pci/if_fxp.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 08e7a29..9a5def5 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -317,7 +317,7 @@ fxp_attach(device_t dev) u_long val; int rid; - mtx_init(&sc->sc_mtx, "fxp", MTX_DEF); + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_DEF); callout_handle_init(&sc->stat_ch); FXP_LOCK(sc); @@ -453,6 +453,7 @@ fxp_detach(device_t dev) free(sc->mcsp, M_DEVBUF); FXP_UNLOCK(sc); + mtx_destroy(&sc->sc_mtx); return 0; } diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index 08e7a29..9a5def5 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -317,7 +317,7 @@ fxp_attach(device_t dev) u_long val; int rid; - mtx_init(&sc->sc_mtx, "fxp", MTX_DEF); + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_DEF); callout_handle_init(&sc->stat_ch); FXP_LOCK(sc); @@ -453,6 +453,7 @@ fxp_detach(device_t dev) free(sc->mcsp, M_DEVBUF); FXP_UNLOCK(sc); + mtx_destroy(&sc->sc_mtx); return 0; } |