Date: Thu, 24 Jun 2010 05:05:18 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209493 - head/sys/powerpc/mpc85xx Message-ID: <201006240505.o5O55I9M086427@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Thu Jun 24 05:05:18 2010 New Revision: 209493 URL: http://svn.freebsd.org/changeset/base/209493 Log: 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). Modified: head/sys/powerpc/mpc85xx/atpic.c Modified: head/sys/powerpc/mpc85xx/atpic.c ============================================================================== --- head/sys/powerpc/mpc85xx/atpic.c Thu Jun 24 00:27:20 2010 (r209492) +++ head/sys/powerpc/mpc85xx/atpic.c Thu Jun 24 05:05:18 2010 (r209493) @@ -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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006240505.o5O55I9M086427>