aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-06-22 16:41:35 -0400
committerLen Brown <len.brown@intel.com>2009-06-25 12:16:33 -0400
commitd02be04707b8ff5375a76c027327e8708877da39 (patch)
tree3589614c40f2543a8b68a999991f0b9ad741fda1 /drivers/acpi
parent5efc5476184173996dfcce780c2bb5e727df674e (diff)
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')
-rw-r--r--drivers/acpi/ec.c19
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)
838static int acpi_ec_add(struct acpi_device *device) 838static int acpi_ec_add(struct acpi_device *device)
839{ 839{
840 struct acpi_ec *ec = NULL; 840 struct acpi_ec *ec = NULL;
841 int ret;
841 842
842 if (!device)
843 return -EINVAL;
844 strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME); 843 strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
845 strcpy(acpi_device_class(device), ACPI_EC_CLASS); 844 strcpy(acpi_device_class(device), ACPI_EC_CLASS);
846 845
@@ -875,21 +874,6 @@ static int acpi_ec_add(struct acpi_device *device)
875 ec->gpe, ec->command_addr, ec->data_addr); 874 ec->gpe, ec->command_addr, ec->data_addr);
876 pr_info(PREFIX "driver started in %s mode\n", 875 pr_info(PREFIX "driver started in %s mode\n",
877 (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll"); 876 (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll");
878 return 0;
879}
880
881static int acpi_ec_start(struct acpi_device *device)
882{
883 struct acpi_ec *ec;
884 int ret = 0;
885
886 if (!device)
887 return -EINVAL;
888
889 ec = acpi_driver_data(device);
890
891 if (!ec)
892 return -EINVAL;
893 877
894 ret = ec_install_handlers(ec); 878 ret = ec_install_handlers(ec);
895 879
@@ -1077,7 +1061,6 @@ static struct acpi_driver acpi_ec_driver = {
1077 .ops = { 1061 .ops = {
1078 .add = acpi_ec_add, 1062 .add = acpi_ec_add,
1079 .remove = acpi_ec_remove, 1063 .remove = acpi_ec_remove,
1080 .start = acpi_ec_start,
1081 .stop = acpi_ec_stop, 1064 .stop = acpi_ec_stop,
1082 .suspend = acpi_ec_suspend, 1065 .suspend = acpi_ec_suspend,
1083 .resume = acpi_ec_resume, 1066 .resume = acpi_ec_resume,