Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: EC: Add ec_get_handle()

toshiba_acpi needs to execute an AML method within the EC namespace
to make hotkeys work on some platforms. Provide an interface to
allow it to easily get a handle to the EC namespace for this purpose.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

authored by

Seth Forshee and committed by
Matthew Garrett
3e2abc5a 7714567c

+11
+10
drivers/acpi/ec.c
··· 445 445 446 446 EXPORT_SYMBOL(ec_transaction); 447 447 448 + /* Get the handle to the EC device */ 449 + acpi_handle ec_get_handle(void) 450 + { 451 + if (!first_ec) 452 + return NULL; 453 + return first_ec->handle; 454 + } 455 + 456 + EXPORT_SYMBOL(ec_get_handle); 457 + 448 458 void acpi_ec_block_transactions(void) 449 459 { 450 460 struct acpi_ec *ec = first_ec;
+1
include/linux/acpi.h
··· 151 151 extern int ec_transaction(u8 command, 152 152 const u8 *wdata, unsigned wdata_len, 153 153 u8 *rdata, unsigned rdata_len); 154 + extern acpi_handle ec_get_handle(void); 154 155 155 156 #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) 156 157