From: akpm@linux-foundation.org
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org,
astarikovskiy@suse.de, len.brown@intel.com,
m.s.tsirkin@gmail.com, rjw@sisk.pl
Subject: [patch (for 2.6.25?) 1/3] ACPI: EC: fix regression
Date: Tue, 04 Mar 2008 15:00:12 -0800 [thread overview]
Message-ID: <200803042300.m24N0CD9001543@imap1.linux-foundation.org> (raw)
From: Alexey Starikovskiy <astarikovskiy@suse.de>
no changelog?
Tested-by: "Michael S. Tsirkin" <m.s.tsirkin@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/ec.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff -puN drivers/acpi/ec.c~acpi-ec-fix-regression drivers/acpi/ec.c
--- a/drivers/acpi/ec.c~acpi-ec-fix-regression
+++ a/drivers/acpi/ec.c
@@ -129,7 +129,8 @@ static struct acpi_ec {
struct mutex lock;
wait_queue_head_t wait;
struct list_head list;
- u8 handlers_installed;
+ u8 handlers_installed:1;
+ u8 from_ecdt:1;
} *boot_ec, *first_ec;
/* --------------------------------------------------------------------------
@@ -772,16 +773,18 @@ static int acpi_ec_add(struct acpi_devic
/* Check for boot EC */
if (boot_ec) {
- if (boot_ec->handle == device->handle) {
- /* Pre-loaded EC from DSDT, just move pointer */
- ec = boot_ec;
- boot_ec = NULL;
- goto end;
- } else if (boot_ec->handle == ACPI_ROOT_OBJECT) {
+ if (boot_ec->from_ecdt &&
+ (boot_ec->handle == device->handle ||
+ boot_ec->handle == ACPI_ROOT_OBJECT)) {
/* ECDT-based EC, time to shut it down */
ec_remove_handlers(boot_ec);
kfree(boot_ec);
first_ec = boot_ec = NULL;
+ } else if (boot_ec->handle == device->handle) {
+ /* Pre-loaded EC from DSDT, just move pointer */
+ ec = boot_ec;
+ boot_ec = NULL;
+ goto end;
}
}
@@ -943,6 +946,7 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec->command_addr = ecdt_ptr->control.address;
boot_ec->data_addr = ecdt_ptr->data.address;
boot_ec->gpe = ecdt_ptr->gpe;
+ boot_ec->from_ecdt = 1;
if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id,
&boot_ec->handle))) {
pr_info("Failed to locate handle for boot EC\n");
_
next reply other threads:[~2008-03-04 23:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 23:00 akpm [this message]
2008-03-04 23:24 ` [patch (for 2.6.25?) 1/3] ACPI: EC: fix regression Alexey Starikovskiy
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=200803042300.m24N0CD9001543@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=astarikovskiy@suse.de \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=m.s.tsirkin@gmail.com \
--cc=rjw@sisk.pl \
/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