fix a bug to handling the argument that it passed `device_t' but it's

handled as `struct ndis_softc'.  It'll cause a panic when the driver is
detached.
This commit is contained in:
Weongyo Jeong 2008-12-27 09:42:17 +00:00
parent 511080ae53
commit e3a7c990ff

View File

@ -1205,11 +1205,13 @@ ndis_pnpevent_nic(arg, type)
void *arg;
int type;
{
device_t dev;
struct ndis_softc *sc;
ndis_handle adapter;
ndis_pnpevent_handler pnpeventfunc;
sc = arg;
dev = arg;
sc = device_get_softc(arg);
NDIS_LOCK(sc);
adapter = sc->ndis_block->nmb_miniportadapterctx;
pnpeventfunc = sc->ndis_chars->nmc_pnpevent_handler;