From owner-p4-projects@FreeBSD.ORG Mon May 2 14:08:56 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A8FCF1065674; Mon, 2 May 2011 14:08:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B7EE106566B for ; Mon, 2 May 2011 14:08:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 58A038FC08 for ; Mon, 2 May 2011 14:08:56 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p42E8uuq040284 for ; Mon, 2 May 2011 14:08:56 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p42E8uVh040281 for perforce@freebsd.org; Mon, 2 May 2011 14:08:56 GMT (envelope-from jhb@freebsd.org) Date: Mon, 2 May 2011 14:08:56 GMT Message-Id: <201105021408.p42E8uVh040281@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 192455 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 14:08:56 -0000 http://p4web.freebsd.org/@@192455?ac=10 Change 192455 by jhb@jhb_jhbbsd on 2011/05/02 14:08:20 Tidy. Affected files ... .. //depot/projects/pci/sys/dev/pci/pci_pci.c#17 edit Differences ... ==== //depot/projects/pci/sys/dev/pci/pci_pci.c#17 (text+ko) ==== @@ -75,10 +75,11 @@ DEVMETHOD(bus_read_ivar, pcib_read_ivar), DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), +#ifdef NEW_PCIB DEVMETHOD(bus_adjust_resource, pcib_adjust_resource), -#ifdef NEW_PCIB DEVMETHOD(bus_release_resource, pcib_release_resource), #else + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), #endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), @@ -1139,6 +1140,18 @@ } int +pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, + u_long start, u_long end) +{ + struct pcib_softc *sc; + + sc = device_get_softc(bus); + if (pcib_is_resource_managed(sc, type, r)) + return (rman_adjust_resource(r, start, end)); + return (bus_generic_adjust_resource(bus, child, type, r, start, end)); +} + +int pcib_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { @@ -1314,20 +1327,6 @@ } #endif -int -pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, - u_long start, u_long end) -{ -#ifdef NEW_PCIB - struct pcib_softc *sc; - - sc = device_get_softc(bus); - if (pcib_is_resource_managed(sc, type, r)) - return (rman_adjust_resource(r, start, end)); -#endif - return (bus_generic_adjust_resource(bus, child, type, r, start, end)); -} - /* * PCIB interface. */