From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: trenn@suse.de, mjg@redhat.com
Subject: + acpi-ec-fix-possible-double-io-port-registration.patch added to -mm tree
Date: Thu, 29 Jul 2010 13:12:46 -0700 [thread overview]
Message-ID: <201007292012.o6TKCkl4031399@imap1.linux-foundation.org> (raw)
The patch titled
acpi ec: fix possible double io port registration
has been added to the -mm tree. Its filename is
acpi-ec-fix-possible-double-io-port-registration.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: acpi ec: fix possible double io port registration
From: Thomas Renninger <trenn@suse.de>
Which will result in a harmless but ugly WARN message on some machines.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/ec.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff -puN drivers/acpi/ec.c~acpi-ec-fix-possible-double-io-port-registration drivers/acpi/ec.c
--- a/drivers/acpi/ec.c~acpi-ec-fix-possible-double-io-port-registration
+++ a/drivers/acpi/ec.c
@@ -811,6 +811,12 @@ static int acpi_ec_add(struct acpi_devic
if (!first_ec)
first_ec = ec;
device->driver_data = ec;
+
+ WARN(!request_region(ec->data_addr, 1, "EC data"),
+ "Could not request EC data io port 0x%lx", ec->data_addr);
+ WARN(!request_region(ec->command_addr, 1, "EC cmd"),
+ "Could not request EC cmd io port 0x%lx", ec->command_addr);
+
pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
ec->gpe, ec->command_addr, ec->data_addr);
@@ -837,6 +843,8 @@ static int acpi_ec_remove(struct acpi_de
kfree(handler);
}
mutex_unlock(&ec->lock);
+ release_region(ec->data_addr, 1);
+ release_region(ec->command_addr, 1);
device->driver_data = NULL;
if (ec == first_ec)
first_ec = NULL;
@@ -857,18 +865,10 @@ ec_parse_io_ports(struct acpi_resource *
* the second address region returned is the status/command
* port.
*/
- if (ec->data_addr == 0) {
+ if (ec->data_addr == 0)
ec->data_addr = resource->data.io.minimum;
- WARN(!request_region(ec->data_addr, 1, "EC data"),
- "Could not request EC data io port %lu",
- ec->data_addr);
- }
- else if (ec->command_addr == 0) {
+ else if (ec->command_addr == 0)
ec->command_addr = resource->data.io.minimum;
- WARN(!request_region(ec->command_addr, 1, "EC command"),
- "Could not request EC command io port %lu",
- ec->command_addr);
- }
else
return AE_CTRL_TERMINATE;
_
Patches currently in -mm which might be from trenn@suse.de are
origin.patch
linux-next.patch
acpi-ec-fix-possible-double-io-port-registration.patch
acpi-ec_sys-be-more-cautious-about-ec-write-access.patch
reply other threads:[~2010-07-29 20:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201007292012.o6TKCkl4031399@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=mm-commits@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;
as well as URLs for NNTP newsgroup(s).