diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-06-22 20:41:35 +0000 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-25 12:16:33 -0400 |
commit | d02be04707b8ff5375a76c027327e8708877da39 (patch) | |
tree | 3589614c40f2543a8b68a999991f0b9ad741fda1 /drivers/acpi/ec.c | |
parent | 5efc5476184173996dfcce780c2bb5e727df674e (diff) | |
download | talos-op-linux-d02be04707b8ff5375a76c027327e8708877da39.tar.gz talos-op-linux-d02be04707b8ff5375a76c027327e8708877da39.zip |
ACPI: EC: remove .start() method
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>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | 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 8b387a48e843..1feedcea2d40 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, |