diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-03-24 18:49:48 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-27 12:50:02 -0400 |
commit | a5f820feb54a59fcdaf4a67a6381ea1ddb36cc6e (patch) | |
tree | f8a9546077306e87fd55f470860b4e15f53539c2 /drivers/acpi | |
parent | e747f274951507b5a0850155c3d709e26d20de5b (diff) |
ACPI: call acpi_ec_init() explicitly rather than as initcall
This patch makes acpi_init() call acpi_ec_init() directly.
Previously, both were subsys_initcalls. acpi_ec_init()
must happen after acpi_init(), and it's better to call it
explicitly rather than rely on link ordering.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@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/bus.c | 1 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 7 | ||||
-rw-r--r-- | drivers/acpi/internal.h | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index cdd11fda5036..9ca683794370 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -880,6 +880,7 @@ static int __init acpi_init(void) | |||
880 | dmi_check_system(power_nocheck_dmi_table); | 880 | dmi_check_system(power_nocheck_dmi_table); |
881 | 881 | ||
882 | acpi_scan_init(); | 882 | acpi_scan_init(); |
883 | acpi_ec_init(); | ||
883 | return result; | 884 | return result; |
884 | } | 885 | } |
885 | 886 | ||
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 2fe15060dcdc..bf88f1803801 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -1069,13 +1069,10 @@ static struct acpi_driver acpi_ec_driver = { | |||
1069 | }, | 1069 | }, |
1070 | }; | 1070 | }; |
1071 | 1071 | ||
1072 | static int __init acpi_ec_init(void) | 1072 | int __init acpi_ec_init(void) |
1073 | { | 1073 | { |
1074 | int result = 0; | 1074 | int result = 0; |
1075 | 1075 | ||
1076 | if (acpi_disabled) | ||
1077 | return 0; | ||
1078 | |||
1079 | acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir); | 1076 | acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir); |
1080 | if (!acpi_ec_dir) | 1077 | if (!acpi_ec_dir) |
1081 | return -ENODEV; | 1078 | return -ENODEV; |
@@ -1090,8 +1087,6 @@ static int __init acpi_ec_init(void) | |||
1090 | return result; | 1087 | return result; |
1091 | } | 1088 | } |
1092 | 1089 | ||
1093 | subsys_initcall(acpi_ec_init); | ||
1094 | |||
1095 | /* EC driver currently not unloadable */ | 1090 | /* EC driver currently not unloadable */ |
1096 | #if 0 | 1091 | #if 0 |
1097 | static void __exit acpi_ec_exit(void) | 1092 | static void __exit acpi_ec_exit(void) |
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 28042c0f2fff..fad8e38ed271 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h | |||
@@ -17,6 +17,7 @@ extern int acpi_power_nocheck; | |||
17 | /* -------------------------------------------------------------------------- | 17 | /* -------------------------------------------------------------------------- |
18 | Embedded Controller | 18 | Embedded Controller |
19 | -------------------------------------------------------------------------- */ | 19 | -------------------------------------------------------------------------- */ |
20 | int acpi_ec_init(void); | ||
20 | int acpi_ec_ecdt_probe(void); | 21 | int acpi_ec_ecdt_probe(void); |
21 | int acpi_boot_ec_enable(void); | 22 | int acpi_boot_ec_enable(void); |
22 | 23 | ||