Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700964

[PATCH v4 2/5] ACPI / property: Don't evaluate objects for devices w/o handle

From Lukas Wunner <lukas@wunner.de>
Newsgroups linux.kernel
Subject [PATCH v4 2/5] ACPI / property: Don't evaluate objects for devices w/o handle
Date 2017-08-01 14:20 +0200
Message-ID <u9Ejx-3Ut-55@gated-at.bofh.it> (permalink)
References <u9Ejv-3Ut-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Fabricated devices such as LNXPWRBN lack a handle, causing evaluation
of _CCA and _DSD to always fail with AE_BAD_PARAMETER.  While that is
merely a (negligible) waste of processing power, evaluating a _DSM for
them (such as Apple's device properties _DSM which we're about to add)
results in an ugly error:

    ACPI: \: failed to evaluate _DSM (0x1001)

Avoid by not evaluating _DSD and the upcoming _DSM for devices without
handle.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
---
 drivers/acpi/property.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index a65c09cc223f..834e01bee015 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -338,6 +338,9 @@ void acpi_init_properties(struct acpi_device *adev)
 
 	INIT_LIST_HEAD(&adev->data.subnodes);
 
+	if (!adev->handle)
+		return;
+
 	/*
 	 * Check if ACPI_DT_NAMESPACE_HID is present and inthat case we fill in
 	 * Device Tree compatible properties for this device.
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/5] Apple SPI properties Lukas Wunner <lukas@wunner.de> - 2017-08-01 14:20 +0200
  [PATCH v4 2/5] ACPI / property: Don't evaluate objects for devices  w/o handle Lukas Wunner <lukas@wunner.de> - 2017-08-01 14:20 +0200
  Re: [PATCH v4 0/5] Apple SPI properties "Rafael J. Wysocki" <rafael@kernel.org> - 2017-08-01 15:10 +0200
    Re: [PATCH v4 0/5] Apple SPI properties "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-10 01:00 +0200

csiph-web