Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Jun 2016 11:40:13 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r301418 - head/sys/dev/acpica
Message-ID:  <8356745.ppeTABNDIP@ralph.baldwin.cx>
In-Reply-To: <201606050202.u5522pKu051460@repo.freebsd.org>
References:  <201606050202.u5522pKu051460@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, June 05, 2016 02:02:51 AM Adrian Chadd wrote:
> Author: adrian
> Date: Sun Jun  5 02:02:51 2016
> New Revision: 301418
> URL: https://svnweb.freebsd.org/changeset/base/301418
> 
> Log:
>   [acpi] graphics drivers want access to acpi lid handle
>   
>   the graphics drivers can benefit from access to the lid handle for querying and getting notifications
>   
>   Submitted by:	kmacy
>   Differential Revision:	https://reviews.freebsd.org/D6643

One could have done this without exposing a global variable:

	device_t dev;

	dev = devclass_get_device(devclass_find("acpi_lid"), 0);
	handle = acpi_get_handle(dev);

Alternatively, we could provide a function locate an ACPI handle
by _HID similar to pci_get_class().

-- 
John Baldwin



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