From owner-p4-projects@FreeBSD.ORG Thu Jan 3 22:40:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F251916A421; Thu, 3 Jan 2008 22:40:34 +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 B7FC116A41A for ; Thu, 3 Jan 2008 22:40:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A8C8C13C4CE for ; Thu, 3 Jan 2008 22:40:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m03MeYeI064937 for ; Thu, 3 Jan 2008 22:40:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m03MeYbJ064934 for perforce@freebsd.org; Thu, 3 Jan 2008 22:40:34 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 3 Jan 2008 22:40:34 GMT Message-Id: <200801032240.m03MeYbJ064934@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132436 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: Thu, 03 Jan 2008 22:40:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=132436 Change 132436 by hselasky@hselasky_laptop001 on 2008/01/03 22:39:52 Small bugfix. "sc->sc_dci.sc_bus.bdev" will be cleared by "usb_detach", so we need to make a copy first and pass that when we delete the child. Affected files ... .. //depot/projects/usb/src/sys/arm/at91/at91_udp.c#4 edit Differences ... ==== //depot/projects/usb/src/sys/arm/at91/at91_udp.c#4 (text+ko) ==== @@ -258,12 +258,13 @@ at91_udp_detach(device_t dev) { struct at91_udp_softc *sc = device_get_softc(dev); + device_t bdev; int err; if (sc->sc_dci.sc_bus.bdev) { - device_detach(sc->sc_dci.sc_bus.bdev); - device_delete_child(dev, sc->sc_dci.sc_bus.bdev); - sc->sc_dci.sc_bus.bdev = NULL; + bdev = sc->sc_dci.sc_bus.bdev; + device_detach(bdev); + device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ device_delete_all_children(dev);