فهرست منبع

usb: fix breakage on systems without ACPI

Commit da0af6e ("usb: Bind devices to ACPI devices when possible") really
tries to force-bind devices even when impossible, unlike what it says in
the subject.

CONFIG_ACPI is not an indication that ACPI tables are actually present, nor
is an indication that any USB relevant information is present in them. There
is no reason to fail the creation of a USB bus if it can't bind it to
ACPI device during initialization.

On systems with CONFIG_ACPI set but without ACPI tables it would cause a
boot panic.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sasha Levin 13 سال پیش
والد
کامیت
ea79c2ed6e
1فایلهای تغییر یافته به همراه1 افزوده شده و 4 حذف شده
  1. 1 4
      drivers/usb/core/usb.c

+ 1 - 4
drivers/usb/core/usb.c

@@ -1015,9 +1015,7 @@ static int __init usb_init(void)
 	if (retval)
 	if (retval)
 		goto out;
 		goto out;
 
 
-	retval = usb_acpi_register();
-	if (retval)
-		goto acpi_register_failed;
+	usb_acpi_register();
 	retval = bus_register(&usb_bus_type);
 	retval = bus_register(&usb_bus_type);
 	if (retval)
 	if (retval)
 		goto bus_register_failed;
 		goto bus_register_failed;
@@ -1053,7 +1051,6 @@ bus_notifier_failed:
 	bus_unregister(&usb_bus_type);
 	bus_unregister(&usb_bus_type);
 bus_register_failed:
 bus_register_failed:
 	usb_acpi_unregister();
 	usb_acpi_unregister();
-acpi_register_failed:
 	usb_debugfs_cleanup();
 	usb_debugfs_cleanup();
 out:
 out:
 	return retval;
 	return retval;