Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2004 20:15:30 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
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
Message-ID:  <200406152015.30925.jhb@FreeBSD.org>
In-Reply-To: <20040614165455.W22842@root.org>
References:  <20040614165455.W22842@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406152015.30925.jhb>