summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-17 22:54:09 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-17 22:54:09 +0200
commit1dcc3d3362b0c97e48290f7786be85b4cec2a147 (patch)
treedc08551dbbd75579eda0807529bbbb829b193155 /drivers/acpi/bus.c
parent5894b0c46e49b5ecc25f22b2d1b8232aab00ce97 (diff)
downloadlinux-1dcc3d3362b0c97e48290f7786be85b4cec2a147.tar.bz2
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>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c4
1 files changed, 3 insertions, 1 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)
*/
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: