public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org,
	Alexey Starikovskiy <astarikovskiy@suse.de>,
	Alex Chiang <achiang@hp.com>
Subject: [PATCH 7/9] ACPI: EC: remove .start() method
Date: Fri, 19 Jun 2009 15:32:09 -0600	[thread overview]
Message-ID: <20090619213209.18001.27739.stgit@bob.kio> (raw)
In-Reply-To: <20090619213038.18001.16533.stgit@bob.kio>

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 <bjorn.helgaas@hp.com>
Reviewed-by: Alex Chiang <achiang@hp.com>
CC: Alexey Starikovskiy <astarikovskiy@suse.de>
---
 drivers/acpi/ec.c |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)

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,


  parent reply	other threads:[~2009-06-19 21:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 21:31 [PATCH 0/9] ACPI: remove .start() and .stop() methods Bjorn Helgaas
2009-06-19 21:31 ` [PATCH 1/9] ACPI: memory hotplug: remove .start() method Bjorn Helgaas
2009-06-19 21:31 ` [PATCH 2/9] ACPI: processor: clean up in acpi_processor_start() error exits Bjorn Helgaas
2009-06-19 21:31 ` [PATCH 3/9] ACPI: processor: emit "online" event in acpi_processor_start() Bjorn Helgaas
2009-06-19 21:31 ` [PATCH 4/9] ACPI: processor: move acpi_processor_start() after acpi_processor_add() Bjorn Helgaas
2009-06-19 21:31 ` [PATCH 5/9] ACPI: processor: remove .start() method Bjorn Helgaas
2009-06-19 21:32 ` [PATCH 6/9] ACPI: EC: move acpi_ec_start() after acpi_ec_add() Bjorn Helgaas
2009-06-19 21:32 ` Bjorn Helgaas [this message]
2009-06-19 21:32 ` [PATCH 8/9] ACPI: EC: remove .stop() method Bjorn Helgaas
2009-06-19 21:32 ` [PATCH 9/9] ACPI: remove unused acpi_device_ops .stop method Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2009-06-22 20:40 [PATCH 0/9 v2] ACPI: remove .start() and .stop() methods Bjorn Helgaas
2009-06-22 20:41 ` [PATCH 7/9] ACPI: EC: remove .start() method Bjorn Helgaas

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=20090619213209.18001.27739.stgit@bob.kio \
    --to=bjorn.helgaas@hp.com \
    --cc=achiang@hp.com \
    --cc=astarikovskiy@suse.de \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    /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