summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-06-23 16:12:36 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-06-23 16:12:36 +0000
commitf2ea075bfec3d7ed2a75e88eb97d7601030791f5 (patch)
tree07ce26c204aa219e8712aa55472321dc2ba5f89f /sys/dev/pcmcia
parent5e3a6b3fad0a44c9aa6f72197daa4fc890126580 (diff)
Pass the correct sizeo() to cfattach struct so we don't panic on detach.
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r--sys/dev/pcmcia/if_an_pcmcia.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pcmcia/if_an_pcmcia.c b/sys/dev/pcmcia/if_an_pcmcia.c
index 0a8644ee118..21a2cd9f0d0 100644
--- a/sys/dev/pcmcia/if_an_pcmcia.c
+++ b/sys/dev/pcmcia/if_an_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_an_pcmcia.c,v 1.2 2000/04/24 19:43:35 niklas Exp $ */
+/* $OpenBSD: if_an_pcmcia.c,v 1.3 2000/06/23 16:12:35 aaron Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -58,16 +58,16 @@ void an_pcmcia_attach __P((struct device *, struct device *, void *));
int an_pcmcia_detach __P((struct device *, int));
int an_pcmcia_activate __P((struct device *, enum devact));
-struct an_pcmcia_softc {
+struct an_pcmcia_softc {
struct an_softc sc_an;
struct pcmcia_io_handle sc_pcioh;
- struct pcmcia_function *sc_pf;
int sc_io_window;
+ struct pcmcia_function *sc_pf;
};
struct cfattach an_pcmcia_ca = {
- sizeof (struct an_softc), an_pcmcia_match, an_pcmcia_attach,
+ sizeof(struct an_pcmcia_softc), an_pcmcia_match, an_pcmcia_attach,
an_pcmcia_detach, an_pcmcia_activate
};
@@ -170,7 +170,7 @@ an_pcmcia_activate(dev, act)
enum devact act;
{
struct an_pcmcia_softc *psc = (struct an_pcmcia_softc *)dev;
- struct an_softc *sc = (struct an_softc *)dev;
+ struct an_softc *sc = &psc->sc_an;
struct ifnet *ifp = &sc->arpcom.ac_if;
int s;