From patchwork Mon Jun 22 20:41:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 31857 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5MKg3E9011289 for ; Mon, 22 Jun 2009 20:42:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754568AbZFVUlh (ORCPT ); Mon, 22 Jun 2009 16:41:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754987AbZFVUlh (ORCPT ); Mon, 22 Jun 2009 16:41:37 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:2689 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753745AbZFVUlh (ORCPT ); Mon, 22 Jun 2009 16:41:37 -0400 Received: from smtp1.fc.hp.com (smtp1.fc.hp.com [15.15.136.127]) by g4t0017.houston.hp.com (Postfix) with ESMTP id 94C6238060; Mon, 22 Jun 2009 20:41:40 +0000 (UTC) Received: from localhost.localdomain (lart.fc.hp.com [15.11.146.31]) by smtp1.fc.hp.com (Postfix) with ESMTP id 282FD2553A8; Mon, 22 Jun 2009 20:05:43 +0000 (UTC) Received: from bob.kio (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 4898026146; Mon, 22 Jun 2009 14:41:40 -0600 (MDT) Subject: [PATCH 8/9] ACPI: EC: remove .stop() method To: Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org, Alexey Starikovskiy , Alex Chiang Date: Mon, 22 Jun 2009 14:41:40 -0600 Message-ID: <20090622204140.32761.14300.stgit@bob.kio> In-Reply-To: <20090622204016.32761.47464.stgit@bob.kio> References: <20090622204016.32761.47464.stgit@bob.kio> User-Agent: StGit/0.14.3.385.gd87a.dirty MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This patch folds the .stop() method into .remove(). acpi_ec_stop() is only called via acpi_device_probe() and acpi_device_remove(), and in both cases it is called immediately before acpi_ec_remove(), so there's no need to have it be a separate method. Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Chiang CC: Alexey Starikovskiy --- drivers/acpi/ec.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 1feedce..d6bf057 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -891,6 +891,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type) return -EINVAL; ec = acpi_driver_data(device); + ec_remove_handlers(ec); mutex_lock(&ec->lock); list_for_each_entry_safe(handler, tmp, &ec->list, node) { list_del(&handler->node); @@ -928,19 +929,6 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context) return AE_OK; } -static int acpi_ec_stop(struct acpi_device *device, int type) -{ - struct acpi_ec *ec; - if (!device) - return -EINVAL; - ec = acpi_driver_data(device); - if (!ec) - return -EINVAL; - ec_remove_handlers(ec); - - return 0; -} - int __init acpi_boot_ec_enable(void) { if (!boot_ec || test_bit(EC_FLAGS_HANDLERS_INSTALLED, &boot_ec->flags)) @@ -1061,7 +1049,6 @@ static struct acpi_driver acpi_ec_driver = { .ops = { .add = acpi_ec_add, .remove = acpi_ec_remove, - .stop = acpi_ec_stop, .suspend = acpi_ec_suspend, .resume = acpi_ec_resume, },