All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Ronald Tschalaer <ronald@innovation.ch>,
	Federico Lorenzi <florenzi@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Leif Liddy <leif.liddy@gmail.com>,
	Daniel Roschka <danielroschka@phoenitydawn.de>,
	Mark Brown <broonie@kernel.org>,
	linux-acpi@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 2/5] ACPI / property: Don't evaluate objects for devices w/o handle
Date: Tue, 1 Aug 2017 14:10:41 +0200	[thread overview]
Message-ID: <4529edaf2ebe244052426ec10c42f805a343816c.1501570421.git.lukas@wunner.de> (raw)
In-Reply-To: <cover.1501570421.git.lukas@wunner.de>

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


  parent reply	other threads:[~2017-08-01 12:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 12:10 [PATCH v4 0/5] Apple SPI properties Lukas Wunner
2017-08-01 12:10 ` [PATCH v4 4/5] ACPI / scan: Recognize Apple SPI and I2C slaves Lukas Wunner
2017-08-01 13:12   ` Mika Westerberg
2017-08-01 12:10 ` Lukas Wunner [this message]
     [not found] ` <cover.1501570421.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-08-01 12:10   ` [PATCH v4 1/5] treewide: Consolidate Apple DMI checks Lukas Wunner
2017-08-01 12:10     ` Lukas Wunner
     [not found]     ` <20f8b74b83ed45171583fe501182c93e5c6eb4d9.1501570421.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-08-01 12:35       ` Andy Shevchenko
2017-08-01 12:35         ` Andy Shevchenko
2017-08-01 12:42         ` Andy Shevchenko
2017-08-01 13:11       ` Mika Westerberg
2017-08-01 13:11         ` Mika Westerberg
2017-08-01 12:10 ` [PATCH v4 3/5] ACPI / property: Support Apple _DSM properties Lukas Wunner
2017-08-01 12:10 ` [PATCH v4 5/5] spi: Use Apple device properties in absence of ACPI resources Lukas Wunner
2017-08-01 13:08 ` [PATCH v4 0/5] Apple SPI properties Rafael J. Wysocki
2017-08-01 13:08   ` Rafael J. Wysocki
2017-08-01 13:08   ` Rafael J. Wysocki
2017-08-09 22:42   ` Rafael J. Wysocki
2017-08-09 22:42     ` Rafael J. Wysocki
2017-08-09 22:42     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4529edaf2ebe244052426ec10c42f805a343816c.1501570421.git.lukas@wunner.de \
    --to=lukas@wunner.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=danielroschka@phoenitydawn.de \
    --cc=florenzi@gmail.com \
    --cc=leif.liddy@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ronald@innovation.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.