aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-17 16:54:09 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-17 16:54:09 -0400
commit1dcc3d3362b0c97e48290f7786be85b4cec2a147 (patch)
treedc08551dbbd75579eda0807529bbbb829b193155
parent5894b0c46e49b5ecc25f22b2d1b8232aab00ce97 (diff)
ACPI / bus: Move ACPI bus type registration
Move the registration of the ACPI bus type to acpi_bus_init() and avoid using ACPI going forward if it fails (too many things depend on the presence of the ACPI bus type). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/bus.c4
-rw-r--r--drivers/acpi/scan.c6
2 files changed, 3 insertions, 7 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 2f50fc4be1d4..7a3ad929f095 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -1039,7 +1039,9 @@ static int __init acpi_bus_init(void)
1039 */ 1039 */
1040 acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL); 1040 acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL);
1041 1041
1042 return 0; 1042 result = bus_register(&acpi_bus_type);
1043 if (!result)
1044 return 0;
1043 1045
1044 /* Mimic structured exception handling */ 1046 /* Mimic structured exception handling */
1045 error1: 1047 error1:
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f541f689ae80..2fe5a37c385c 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1891,12 +1891,6 @@ int __init acpi_scan_init(void)
1891{ 1891{
1892 int result; 1892 int result;
1893 1893
1894 result = bus_register(&acpi_bus_type);
1895 if (result) {
1896 /* We don't want to quit even if we failed to add suspend/resume */
1897 printk(KERN_ERR PREFIX "Could not register bus type\n");
1898 }
1899
1900 acpi_pci_root_init(); 1894 acpi_pci_root_init();
1901 acpi_pci_link_init(); 1895 acpi_pci_link_init();
1902 acpi_processor_init(); 1896 acpi_processor_init();