summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/glue.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-28 13:00:38 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-28 13:00:38 +0200
commitbdc8f09685a25a12f2f5282f56672ba663ecb88c (patch)
treeb888dceb25d55ec0cd9790b246cd255c20e57e09 /drivers/acpi/glue.c
parentf4c9f402389977dc852ef4848c7615926306735d (diff)
parenteff9a4b62b14cf0d9913e3caf1f26f8b7a6105c9 (diff)
downloadop-kernel-dev-bdc8f09685a25a12f2f5282f56672ba663ecb88c.zip
op-kernel-dev-bdc8f09685a25a12f2f5282f56672ba663ecb88c.tar.gz
Merge branch 'acpi-assorted'
* acpi-assorted: ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan ACPI: Add CMOS RTC Operation Region handler support ACPI: Remove unused flags in acpi_device_flags ACPI: Remove useless initializers ACPI / battery: Make sure all spaces are in correct places ACPI: add _STA evaluation at do_acpi_find_child() ACPI / EC: access user space with get_user()/put_user()
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r--drivers/acpi/glue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 9783f40..f680957 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -81,13 +81,15 @@ static struct acpi_bus_type *acpi_get_bus_type(struct device *dev)
static acpi_status do_acpi_find_child(acpi_handle handle, u32 lvl_not_used,
void *addr_p, void **ret_p)
{
- unsigned long long addr;
+ unsigned long long addr, sta;
acpi_status status;
status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &addr);
if (ACPI_SUCCESS(status) && addr == *((u64 *)addr_p)) {
*ret_p = handle;
- return AE_CTRL_TERMINATE;
+ status = acpi_bus_get_status_handle(handle, &sta);
+ if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_ENABLED))
+ return AE_CTRL_TERMINATE;
}
return AE_OK;
}
OpenPOWER on IntegriCloud