summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/mpc85xx
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-06-24 05:05:18 +0000
committermarcel <marcel@FreeBSD.org>2010-06-24 05:05:18 +0000
commit5f1f55f8200e120bef76235b7b9f5dfd018ce52c (patch)
treeaad0bdae8546552b424bec56bc82ea875ef73801 /sys/powerpc/mpc85xx
parentecf1995ac74b37fa9daeeaaa7a0c9902987ba438 (diff)
downloadFreeBSD-src-5f1f55f8200e120bef76235b7b9f5dfd018ce52c.zip
FreeBSD-src-5f1f55f8200e120bef76235b7b9f5dfd018ce52c.tar.gz
Pass the device_t of the AT PIC driver to atpic_intr() so that
we don't have to use a global variable. Pass a NULL frame pointer to the dispatch function just like openpic(4).
Diffstat (limited to 'sys/powerpc/mpc85xx')
-rw-r--r--sys/powerpc/mpc85xx/atpic.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/powerpc/mpc85xx/atpic.c b/sys/powerpc/mpc85xx/atpic.c
index 4a4f5f1..834493c 100644
--- a/sys/powerpc/mpc85xx/atpic.c
+++ b/sys/powerpc/mpc85xx/atpic.c
@@ -82,8 +82,6 @@ static void atpic_mask(device_t, u_int);
static void atpic_unmask(device_t, u_int);
static uint32_t atpic_id (device_t dev);
-static device_t pic8259;
-
static device_method_t atpic_isa_methods[] = {
/* Device interface */
DEVMETHOD(device_identify, atpic_isa_identify),
@@ -140,7 +138,7 @@ static void
atpic_intr(void *arg)
{
- atpic_dispatch(pic8259, arg);
+ atpic_dispatch(arg, NULL);
}
static void
@@ -217,7 +215,7 @@ atpic_isa_attach(device_t dev)
goto fail;
error = bus_setup_intr(dev, sc->sc_ires, INTR_TYPE_MISC | INTR_MPSAFE,
- NULL, atpic_intr, NULL, &sc->sc_icookie);
+ NULL, atpic_intr, dev, &sc->sc_icookie);
if (error)
goto fail;
@@ -225,7 +223,6 @@ atpic_isa_attach(device_t dev)
atpic_init(sc, ATPIC_MASTER);
powerpc_register_pic(dev, 0x10);
- pic8259 = dev;
return (0);
fail:
OpenPOWER on IntegriCloud