From patchwork Mon Jun 22 20:41:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 31856 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 n5MKg3E8011289 for ; Mon, 22 Jun 2009 20:42:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752623AbZFVUlc (ORCPT ); Mon, 22 Jun 2009 16:41:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753896AbZFVUlc (ORCPT ); Mon, 22 Jun 2009 16:41:32 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:2662 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752623AbZFVUlc (ORCPT ); Mon, 22 Jun 2009 16:41:32 -0400 Received: from smtp1.fc.hp.com (smtp.fc.hp.com [15.15.136.127]) by g4t0017.houston.hp.com (Postfix) with ESMTP id 8821D38448; Mon, 22 Jun 2009 20:41:35 +0000 (UTC) Received: from localhost.localdomain (lart.fc.hp.com [15.11.146.31]) by smtp1.fc.hp.com (Postfix) with ESMTP id 13E022553BD; Mon, 22 Jun 2009 20:05:38 +0000 (UTC) Received: from bob.kio (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 3272526146; Mon, 22 Jun 2009 14:41:35 -0600 (MDT) Subject: [PATCH 7/9] ACPI: EC: remove .start() method To: Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org, Alexey Starikovskiy , Alex Chiang Date: Mon, 22 Jun 2009 14:41:35 -0600 Message-ID: <20090622204135.32761.35892.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 .start() method into .add(). acpi_ec_start() is always called immediately after acpi_ec_add(), 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 | 19 +------------------ 1 files changed, 1 insertions(+), 18 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 8b387a4..1feedce 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -838,9 +838,8 @@ static void ec_remove_handlers(struct acpi_ec *ec) static int acpi_ec_add(struct acpi_device *device) { struct acpi_ec *ec = NULL; + int ret; - if (!device) - return -EINVAL; strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_EC_CLASS); @@ -875,21 +874,6 @@ static int acpi_ec_add(struct acpi_device *device) ec->gpe, ec->command_addr, ec->data_addr); pr_info(PREFIX "driver started in %s mode\n", (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll"); - return 0; -} - -static int acpi_ec_start(struct acpi_device *device) -{ - struct acpi_ec *ec; - int ret = 0; - - if (!device) - return -EINVAL; - - ec = acpi_driver_data(device); - - if (!ec) - return -EINVAL; ret = ec_install_handlers(ec); @@ -1077,7 +1061,6 @@ static struct acpi_driver acpi_ec_driver = { .ops = { .add = acpi_ec_add, .remove = acpi_ec_remove, - .start = acpi_ec_start, .stop = acpi_ec_stop, .suspend = acpi_ec_suspend, .resume = acpi_ec_resume,