Skip to content

Commit

Permalink
ACPI / bus: Move ACPI bus type registration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Jul 17, 2015
1 parent 5894b0c commit 1dcc3d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1dcc3d3

Please sign in to comment.