From owner-svn-src-all@FreeBSD.ORG Thu Jun 24 05:05:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07F9E106566B; Thu, 24 Jun 2010 05:05:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAD9B8FC14; Thu, 24 Jun 2010 05:05:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5O55Ir0086428; Thu, 24 Jun 2010 05:05:18 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5O55I9M086427; Thu, 24 Jun 2010 05:05:18 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006240505.o5O55I9M086427@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 24 Jun 2010 05:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209493 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jun 2010 05:05:19 -0000 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: