]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ACPI / bus: Move ACPI bus type registration
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 17 Jul 2015 20:54:09 +0000 (22:54 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 17 Jul 2015 20:54:09 +0000 (22:54 +0200)
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>
drivers/acpi/bus.c
drivers/acpi/scan.c

index 2f50fc4be1d45d4ea0cb49110ca920bcdd73192d..7a3ad929f09573894dd20cc038fd2840aed5483e 100644 (file)
@@ -1039,7 +1039,9 @@ static int __init acpi_bus_init(void)
         */
        acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL);
 
-       return 0;
+       result = bus_register(&acpi_bus_type);
+       if (!result)
+               return 0;
 
        /* Mimic structured exception handling */
       error1:
index f541f689ae80b93524b9951cbb43d8d22af0238e..2fe5a37c385c31e921de3a5b3a874e80fa365601 100644 (file)
@@ -1891,12 +1891,6 @@ int __init acpi_scan_init(void)
 {
        int result;
 
-       result = bus_register(&acpi_bus_type);
-       if (result) {
-               /* We don't want to quit even if we failed to add suspend/resume */
-               printk(KERN_ERR PREFIX "Could not register bus type\n");
-       }
-
        acpi_pci_root_init();
        acpi_pci_link_init();
        acpi_processor_init();