From owner-freebsd-current@FreeBSD.ORG Wed Jun 16 00:16:10 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B7C216A4CE for ; Wed, 16 Jun 2004 00:16:10 +0000 (GMT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EE9E43D5D for ; Wed, 16 Jun 2004 00:16:10 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 10407 invoked from network); 16 Jun 2004 00:14:43 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 16 Jun 2004 00:14:42 -0000 Received: from 10.50.41.233 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i5G0Ebt9068221; Tue, 15 Jun 2004 20:14:38 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Nate Lawson Date: Tue, 15 Jun 2004 20:15:30 -0400 User-Agent: KMail/1.6 References: <20040614165455.W22842@root.org> In-Reply-To: <20040614165455.W22842@root.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406152015.30925.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: current@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/acpica acpi.c acpi_acad.c acpi_button.c acpi_resource.c acpivar.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2004 00:16:10 -0000 On Monday 14 June 2004 07:57 pm, Nate Lawson wrote: > I think I know my problem. I was testing using modules and so I had the > latest changes to acpi.ko (which now don't init the table to NULL) but no > changes to the kernel (checking for the acpi devclass). > > Sorry, this looks like pilot error. I'll test the change of just using > devclass_find() instead of also device_get_softc() and commit. devclass_find() will succeed even if acpi0 fails to probe. The softc is only null if the device is attached I suppose, so even if you do devclass_get_device() you have to check to see if the device_t's state is > DS_NOTPRESENT. device_get_softc() manages to do that for you in one check since a DS_NOTPRESENT device has a NULL softc (as does a non-existent device). -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org