From owner-p4-projects@FreeBSD.ORG Sun May 21 06:04:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 360FF16A428; Sun, 21 May 2006 06:04:09 +0000 (UTC) X-Original-To: perforce@freebsd.org 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 DC88816A41F for ; Sun, 21 May 2006 06:04:08 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AADEE43D46 for ; Sun, 21 May 2006 06:04:08 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4L63WrR049636 for ; Sun, 21 May 2006 06:03:32 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4L63W41049633 for perforce@freebsd.org; Sun, 21 May 2006 06:03:32 GMT (envelope-from jmg@freebsd.org) Date: Sun, 21 May 2006 06:03:32 GMT Message-Id: <200605210603.k4L63W41049633@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 Cc: Subject: PERFORCE change 97554 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 May 2006 06:04:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=97554 Change 97554 by jmg@jmg_carbon-60 on 2006/05/21 06:02:36 use function to get the parent instead of knowing what a device_t looks like... Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/kern/subr_bus.c#5 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/kern/subr_bus.c#5 (text+ko) ==== @@ -3624,10 +3624,12 @@ bus_dma_tag_t bus_get_dma_tag(device_t dev) { + device_t parent; - if (dev->parent == NULL) + parent = device_get_parent(child); + if (parent == NULL) return (NULL); - return (BUS_GET_DMA_TAG(dev->parent, dev)); + return (BUS_GET_DMA_TAG(parent, dev)); } /* Resume all devices and then notify userland that we're up again. */