Date: Mon, 21 Jul 2003 23:23:12 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Nate Lawson <nate@root.org> Cc: cvs-all@FreeBSD.org Subject: RE: cvs commit: src/sys/dev/acpica acpi_ec.c Message-ID: <XFMail.20030721232312.jhb@FreeBSD.org> In-Reply-To: <20030721144250.B34834@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21-Jul-2003 Nate Lawson wrote: > On Mon, 21 Jul 2003, John Baldwin wrote: >> On 21-Jul-2003 Nate Lawson wrote: >> > The sequence with ECDT is: >> > acpi_attach() >> > acpi_ec_ecdt_probe() >> > if ECDT present >> > device_add_child("acpi_ec") >> > device_probe_and_attach() >> > acpi_ec_probe() >> > if ECDT magic set in ivars >> > done >> >> The magic part seems evil. I'm not sure yet of a better way to handle >> that though. > > The reason this was done is that there are two paths for getting resources > about the EC: ECDT and namespace. They can share a common probe/attach > function if we take the same route (ivars) for passing the data to > probe/attach. Since the ivars are zeroed before device_probe() is called > and an already probed ACPI_DEVICE object is extremely unlikely to use the > same magic since it's a pointer to the acpi_ec_devclass, this is a low > risk approach. I understand the reason for the magic approach, I'm just uncomfortable with it. I won't object to it though unless I manage to think of something cleaner. -- 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?XFMail.20030721232312.jhb>