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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
436e8c7d45
commit
29e409f0f7
@@ -355,7 +355,7 @@ static struct pci_driver xhci_pci_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
int __init xhci_register_pci(void)
|
||||
static int __init xhci_pci_init(void)
|
||||
{
|
||||
xhci_init_driver(&xhci_pci_hc_driver, xhci_pci_setup);
|
||||
#ifdef CONFIG_PM
|
||||
@@ -364,8 +364,13 @@ int __init xhci_register_pci(void)
|
||||
#endif
|
||||
return pci_register_driver(&xhci_pci_driver);
|
||||
}
|
||||
module_init(xhci_pci_init);
|
||||
|
||||
void xhci_unregister_pci(void)
|
||||
static void __exit xhci_pci_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&xhci_pci_driver);
|
||||
}
|
||||
module_exit(xhci_pci_exit);
|
||||
|
||||
MODULE_DESCRIPTION("xHCI PCI Host Controller Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
Reference in New Issue
Block a user