public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Holger Macht <hmacht@suse.de>
To: linux-acpi@vger.kernel.org
Cc: Len Brown <lenb@kernel.org>,
	Kristen Carlson Accardi <kristen.c.accardi@intel.com>,
	trenn@suse.de
Subject: [PATCH] ACPI: Do not pass NULL to acpi_get_handle() when looking for _EJD
Date: Thu, 14 Feb 2008 13:40:34 +0100	[thread overview]
Message-ID: <20080214124034.GA9708@homac.suse.de> (raw)

When trying to get the acpi_handle from an acpi_buffer, pass
ACPI_ROOT_OBJECT instead of NULL to acpi_get_handle(). This fixes the
detection of dock dependent bays.


Signed-off-by: Holger Macht <hmacht@suse.de>
---

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 3fac011..d9b9143 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -609,7 +609,8 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd)
 	status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer);
 	if (ACPI_SUCCESS(status)) {
 		obj = buffer.pointer;
-		status = acpi_get_handle(NULL, obj->string.pointer, ejd);
+		status = acpi_get_handle(ACPI_ROOT_OBJECT, obj->string.pointer,
+					 ejd);
 		kfree(buffer.pointer);
 	}
 	return status;


             reply	other threads:[~2008-02-14 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14 12:40 Holger Macht [this message]
2008-02-14 14:49 ` [PATCH] ACPI: Do not pass NULL to acpi_get_handle() when looking for _EJD Thomas Renninger
2008-02-14 15:02   ` Thomas Renninger

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=20080214124034.GA9708@homac.suse.de \
    --to=hmacht@suse.de \
    --cc=kristen.c.accardi@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=trenn@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox