diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-06-22 16:41:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-25 12:16:33 -0400 |
commit | cf745ec7a1222a661b2c5f0e8c2c4be81300d2a4 (patch) | |
tree | eabebf496f7c06bebb20137097ac956b601e71a7 /drivers/acpi/ec.c | |
parent | d02be04707b8ff5375a76c027327e8708877da39 (diff) |
ACPI: EC: remove .stop() method
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 <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 | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 1feedcea2d40..d6bf0578737b 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) | |||
891 | return -EINVAL; | 891 | return -EINVAL; |
892 | 892 | ||
893 | ec = acpi_driver_data(device); | 893 | ec = acpi_driver_data(device); |
894 | ec_remove_handlers(ec); | ||
894 | mutex_lock(&ec->lock); | 895 | mutex_lock(&ec->lock); |
895 | list_for_each_entry_safe(handler, tmp, &ec->list, node) { | 896 | list_for_each_entry_safe(handler, tmp, &ec->list, node) { |
896 | list_del(&handler->node); | 897 | list_del(&handler->node); |
@@ -928,19 +929,6 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context) | |||
928 | return AE_OK; | 929 | return AE_OK; |
929 | } | 930 | } |
930 | 931 | ||
931 | static int acpi_ec_stop(struct acpi_device *device, int type) | ||
932 | { | ||
933 | struct acpi_ec *ec; | ||
934 | if (!device) | ||
935 | return -EINVAL; | ||
936 | ec = acpi_driver_data(device); | ||
937 | if (!ec) | ||
938 | return -EINVAL; | ||
939 | ec_remove_handlers(ec); | ||
940 | |||
941 | return 0; | ||
942 | } | ||
943 | |||
944 | int __init acpi_boot_ec_enable(void) | 932 | int __init acpi_boot_ec_enable(void) |
945 | { | 933 | { |
946 | if (!boot_ec || test_bit(EC_FLAGS_HANDLERS_INSTALLED, &boot_ec->flags)) | 934 | if (!boot_ec || test_bit(EC_FLAGS_HANDLERS_INSTALLED, &boot_ec->flags)) |
@@ -1061,7 +1049,6 @@ static struct acpi_driver acpi_ec_driver = { | |||
1061 | .ops = { | 1049 | .ops = { |
1062 | .add = acpi_ec_add, | 1050 | .add = acpi_ec_add, |
1063 | .remove = acpi_ec_remove, | 1051 | .remove = acpi_ec_remove, |
1064 | .stop = acpi_ec_stop, | ||
1065 | .suspend = acpi_ec_suspend, | 1052 | .suspend = acpi_ec_suspend, |
1066 | .resume = acpi_ec_resume, | 1053 | .resume = acpi_ec_resume, |
1067 | }, | 1054 | }, |