From owner-svn-src-all@freebsd.org Mon Jun 6 19:11:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6004B6D678; Mon, 6 Jun 2016 19:11:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8811AF7; Mon, 6 Jun 2016 19:11:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CE486B9B8; Mon, 6 Jun 2016 15:02:49 -0400 (EDT) From: John Baldwin To: Adrian Chadd Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301418 - head/sys/dev/acpica Date: Mon, 06 Jun 2016 11:40:13 -0700 Message-ID: <8356745.ppeTABNDIP@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201606050202.u5522pKu051460@repo.freebsd.org> References: <201606050202.u5522pKu051460@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 06 Jun 2016 15:02:49 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2016 19:11:46 -0000 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