summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/usb.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-05-11 16:08:27 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-11 17:06:13 -0700
commitda0af6e78ef311d97754aa03e10eade82cc99e16 (patch)
tree52d904e831d619452299844c7f55b61be2d62a53 /drivers/usb/core/usb.c
parent38ac0f1b90dc9486cc039f1a4d8b0202813e5b67 (diff)
downloadlinux-stable-da0af6e78ef311d97754aa03e10eade82cc99e16.tar.gz
linux-stable-da0af6e78ef311d97754aa03e10eade82cc99e16.tar.bz2
linux-stable-da0af6e78ef311d97754aa03e10eade82cc99e16.zip
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>
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r--drivers/usb/core/usb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 0ce862bfdd77..7998a67503c1 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -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();
}