From owner-p4-projects@FreeBSD.ORG Wed Feb 23 07:13:44 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D2FC816A4D0; Wed, 23 Feb 2005 07:13:43 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABDF716A4CE for ; Wed, 23 Feb 2005 07:13:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91E6143D46 for ; Wed, 23 Feb 2005 07:13:43 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1N7DhH4022445 for ; Wed, 23 Feb 2005 07:13:43 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1N7DhFe022442 for perforce@freebsd.org; Wed, 23 Feb 2005 07:13:43 GMT (envelope-from jmg@freebsd.org) Date: Wed, 23 Feb 2005 07:13:43 GMT Message-Id: <200502230713.j1N7DhFe022442@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Subject: PERFORCE change 71638 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 07:13:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=71638 Change 71638 by jmg@jmg_carbon on 2005/02/23 07:12:44 keep the rid around for the resources if/when we release them... Affected files ... .. //depot/projects/arm/src/sys/arm/ep93xx/epclk.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/arm/ep93xx/epclk.c#4 (text+ko) ==== @@ -115,10 +115,12 @@ } struct epclk_softc { + int sc_timerrid; struct resource *sc_timerres; bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; + int sc_irqrid; struct resource *sc_irqres; void *sc_irqcookie; @@ -131,13 +133,12 @@ static int epclk_attach(device_t dev) { - int i; epclk = device_get_softc(dev); - i = 0; - epclk->sc_timerres = bus_alloc_resource(dev, SYS_RES_MEMORY, &i, 0, ~0, - ~0, RF_ACTIVE); + epclk->sc_timerrid = 0; + epclk->sc_timerres = bus_alloc_resource(dev, SYS_RES_MEMORY, + &epclk->sc_timerrid, 0, ~0, ~0, RF_ACTIVE); if (epclk->sc_timerres == NULL) return ENXIO; @@ -192,7 +193,6 @@ void cpu_initclocks(void) { - int rid; stathz = profhz = 0; @@ -202,9 +202,9 @@ /* clear 64Hz interrupt status */ bus_space_write_4(epclk->sc_iot, epclk->sc_teoi_ioh, 0, 1); - rid = 0; - epclk->sc_irqres = bus_alloc_resource(epclk->dev, SYS_RES_IRQ, &rid, - 0, ~0, 1, RF_ACTIVE); + epclk->sc_irqrid = 0; + epclk->sc_irqres = bus_alloc_resource(epclk->dev, SYS_RES_IRQ, + &epclk->sc_irqrid, 0, ~0, 1, RF_ACTIVE); if (!epclk->sc_irqres) panic("Unable to setup the clock irq handler.\n"); else