mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
usb: Bind devices to ACPI devices when possible
Built-in USB devices will typically have a representation in the system ACPI tables. Add support for binding the two together so the USB code can make use of the associated methods. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
38ac0f1b90
commit
da0af6e78e
4 changed files with 74 additions and 0 deletions
|
@ -1015,6 +1015,9 @@ static int __init usb_init(void)
|
|||
if (retval)
|
||||
goto out;
|
||||
|
||||
retval = usb_acpi_register();
|
||||
if (retval)
|
||||
goto acpi_register_failed;
|
||||
retval = bus_register(&usb_bus_type);
|
||||
if (retval)
|
||||
goto bus_register_failed;
|
||||
|
@ -1049,6 +1052,8 @@ major_init_failed:
|
|||
bus_notifier_failed:
|
||||
bus_unregister(&usb_bus_type);
|
||||
bus_register_failed:
|
||||
usb_acpi_unregister();
|
||||
acpi_register_failed:
|
||||
usb_debugfs_cleanup();
|
||||
out:
|
||||
return retval;
|
||||
|
@ -1070,6 +1075,7 @@ static void __exit usb_exit(void)
|
|||
usb_hub_cleanup();
|
||||
bus_unregister_notifier(&usb_bus_type, &usb_bus_nb);
|
||||
bus_unregister(&usb_bus_type);
|
||||
usb_acpi_unregister();
|
||||
usb_debugfs_cleanup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue