diff options
author | Andrew Bresticker <abrestic@chromium.org> | 2014-10-03 04:35:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-03 17:44:45 -0400 |
commit | 29e409f0f7613f9fd2235e41f0fa33e48e94544e (patch) | |
tree | 3cbc0c17d8e7bfb2c86466b4cdfaac75c4abd423 /drivers/usb/host/xhci.c | |
parent | 436e8c7d457ff4ca89beca20cf54f5884de6af61 (diff) |
xhci: Allow xHCI drivers to be built as separate modules
Instead of building all of the xHCI code into a single module, separate
it out into the core (xhci-hcd), PCI (xhci-pci, now selected by the new
config option CONFIG_USB_XHCI_PCI), and platform (xhci-plat) drivers.
Also update the PCI/platform drivers with module descriptions/licenses
and have them register their respective drivers in their initcalls.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 3e0f5c7aed7a..2a5d45b4cb15 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -4982,18 +4982,6 @@ MODULE_LICENSE("GPL"); | |||
4982 | 4982 | ||
4983 | static int __init xhci_hcd_init(void) | 4983 | static int __init xhci_hcd_init(void) |
4984 | { | 4984 | { |
4985 | int retval; | ||
4986 | |||
4987 | retval = xhci_register_pci(); | ||
4988 | if (retval < 0) { | ||
4989 | pr_debug("Problem registering PCI driver.\n"); | ||
4990 | return retval; | ||
4991 | } | ||
4992 | retval = xhci_register_plat(); | ||
4993 | if (retval < 0) { | ||
4994 | pr_debug("Problem registering platform driver.\n"); | ||
4995 | goto unreg_pci; | ||
4996 | } | ||
4997 | /* | 4985 | /* |
4998 | * Check the compiler generated sizes of structures that must be laid | 4986 | * Check the compiler generated sizes of structures that must be laid |
4999 | * out in specific ways for hardware access. | 4987 | * out in specific ways for hardware access. |
@@ -5012,15 +5000,5 @@ static int __init xhci_hcd_init(void) | |||
5012 | /* xhci_run_regs has eight fields and embeds 128 xhci_intr_regs */ | 5000 | /* xhci_run_regs has eight fields and embeds 128 xhci_intr_regs */ |
5013 | BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8); | 5001 | BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8); |
5014 | return 0; | 5002 | return 0; |
5015 | unreg_pci: | ||
5016 | xhci_unregister_pci(); | ||
5017 | return retval; | ||
5018 | } | 5003 | } |
5019 | module_init(xhci_hcd_init); | 5004 | module_init(xhci_hcd_init); |
5020 | |||
5021 | static void __exit xhci_hcd_cleanup(void) | ||
5022 | { | ||
5023 | xhci_unregister_pci(); | ||
5024 | xhci_unregister_plat(); | ||
5025 | } | ||
5026 | module_exit(xhci_hcd_cleanup); | ||