Remember to assign an_dev to device_t before calling an_attach().

This commit is contained in:
Bill Paul 2000-10-13 22:04:20 +00:00
parent ac5f943c37
commit a95b77ec78
3 changed files with 13 additions and 0 deletions

View file

@ -70,6 +70,11 @@
#include <dev/an/if_aironet_ieee.h>
#include <dev/an/if_anreg.h>
#ifndef lint
static const char rcsid[] =
"$FreeBSD$";
#endif
static struct isa_pnp_id an_ids[] = {
{ 0x0100ec06, "Aironet ISA4500/ISA4800" },
{ 0, NULL }
@ -120,6 +125,7 @@ an_attach_isa(dev)
sc->an_bhandle = rman_get_bushandle(sc->port_res);
sc->an_btag = rman_get_bustag(sc->port_res);
sc->an_dev = dev;
return an_attach(sc, device_get_unit(dev), flags);
}

View file

@ -64,6 +64,11 @@
#include <net/if_dl.h>
#include <net/if_types.h>
#ifndef lint
static const char rcsid[] =
"$FreeBSD$";
#endif
#include <dev/an/if_aironet_ieee.h>
#include <dev/an/if_anreg.h>
@ -149,6 +154,7 @@ an_pccard_attach(device_t dev)
sc->an_bhandle = rman_get_bushandle(sc->port_res);
sc->an_btag = rman_get_bustag(sc->port_res);
sc->an_dev = dev;
error = an_attach(sc, device_get_unit(dev), flags);
return (error);

View file

@ -181,6 +181,7 @@ static int an_attach_pci(dev)
goto fail;
}
sc->an_dev = dev;
error = an_attach(sc, device_get_unit(dev), flags);
fail: