From patchwork Fri Jul 16 11:11:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 112404 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6GBCkiP025226 for ; Fri, 16 Jul 2010 11:12:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965217Ab0GPLMg (ORCPT ); Fri, 16 Jul 2010 07:12:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43432 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965149Ab0GPLLm (ORCPT ); Fri, 16 Jul 2010 07:11:42 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 51C0287104; Fri, 16 Jul 2010 13:11:41 +0200 (CEST) From: Thomas Renninger To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Thomas Renninger , Alexey Starikovskiy , Bjorn Helgaas Subject: [PATCH 3/7] ACPI: Register EC io ports in /proc/ioports Date: Fri, 16 Jul 2010 13:11:33 +0200 Message-Id: <1279278697-3694-4-git-send-email-trenn@suse.de> X-Mailer: git-send-email 1.6.3 In-Reply-To: <1279278697-3694-1-git-send-email-trenn@suse.de> References: <1279278697-3694-1-git-send-email-trenn@suse.de> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 16 Jul 2010 11:12:47 +0000 (UTC) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 4b6759f..f95fa9f 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -927,10 +927,18 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context) * 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; - else if (ec->command_addr == 0) + 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) { 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;