From owner-svn-src-head@FreeBSD.ORG Wed Feb 11 04:54:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09649106564A; Wed, 11 Feb 2009 04:54:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D20708FC13; Wed, 11 Feb 2009 04:54:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1B4s2UK014401; Wed, 11 Feb 2009 04:54:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1B4s2P7014400; Wed, 11 Feb 2009 04:54:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200902110454.n1B4s2P7014400@svn.freebsd.org> From: Warner Losh Date: Wed, 11 Feb 2009 04:54:02 +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: r188476 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2009 04:54:03 -0000 Author: imp Date: Wed Feb 11 04:54:02 2009 New Revision: 188476 URL: http://svn.freebsd.org/changeset/base/188476 Log: o Use NULL in pereference to 0 in pointer contexts. o Use newly minted KOBJMETHOD_END as appropriate o fix prototype for root_setup_intr. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Wed Feb 11 04:52:46 2009 (r188475) +++ head/sys/kern/subr_bus.c Wed Feb 11 04:54:02 2009 (r188476) @@ -220,7 +220,7 @@ devclass_sysctl_init(devclass_t dc) sysctl_ctx_init(&dc->sysctl_ctx); dc->sysctl_tree = SYSCTL_ADD_NODE(&dc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_dev), OID_AUTO, dc->name, - CTLFLAG_RD, 0, ""); + CTLFLAG_RD, NULL, ""); SYSCTL_ADD_PROC(&dc->sysctl_ctx, SYSCTL_CHILDREN(dc->sysctl_tree), OID_AUTO, "%parent", CTLFLAG_RD, dc, DEVCLASS_SYSCTL_PARENT, devclass_sysctl_handler, "A", @@ -283,7 +283,7 @@ device_sysctl_init(device_t dev) dev->sysctl_tree = SYSCTL_ADD_NODE(&dev->sysctl_ctx, SYSCTL_CHILDREN(dc->sysctl_tree), OID_AUTO, dev->nameunit + strlen(dc->name), - CTLFLAG_RD, 0, ""); + CTLFLAG_RD, NULL, ""); SYSCTL_ADD_PROC(&dev->sysctl_ctx, SYSCTL_CHILDREN(dev->sysctl_tree), OID_AUTO, "%desc", CTLFLAG_RD, dev, DEVICE_SYSCTL_DESC, device_sysctl_handler, "A", @@ -349,8 +349,8 @@ device_sysctl_fini(device_t dev) static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS); static int devctl_disable = 0; TUNABLE_INT("hw.bus.devctl_disable", &devctl_disable); -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, 0, 0, - sysctl_devctl_disable, "I", "devctl disable"); +SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, NULL, + 0, sysctl_devctl_disable, "I", "devctl disable"); static d_open_t devopen; static d_close_t devclose; @@ -745,7 +745,7 @@ static TAILQ_HEAD(,device) bus_data_devi static int bus_data_generation = 1; static kobj_method_t null_methods[] = { - { 0, 0 } + KOBJMETHOD_END }; DEFINE_CLASS(null, null_methods, 0); @@ -3774,8 +3774,8 @@ root_print_child(device_t dev, device_t } static int -root_setup_intr(device_t dev, device_t child, driver_intr_t *intr, void *arg, - void **cookiep) +root_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, + driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) { /* * If an interrupt mapping gets to here something bad has happened. @@ -3809,7 +3809,7 @@ static kobj_method_t root_methods[] = { KOBJMETHOD(bus_setup_intr, root_setup_intr), KOBJMETHOD(bus_child_present, root_child_present), - { 0, 0 } + KOBJMETHOD_END }; static driver_t root_driver = {