aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-pci.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2006-12-13 15:09:54 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:44:33 -0500
commit5e16fabe5dbcff15de6cdcba406195fe6e4380df (patch)
treef6004b46e6e84fd44f4bc352260e9a970f7be279 /drivers/usb/host/ohci-pci.c
parentad55d71a3d4401f44b4ddee1412283c99eedd05c (diff)
ohci: Rework bus glue integration to allow several at once
The previous model had the module_init & module_exit function in the bus glue .c files themselves. That's a problem if several glues need to be selected at once and the driver is built has module. This case is quite common in embedded system where you want to handle both the integrated ohci controller and some extra controller on PCI. The ohci-hcd.c file now provide the module_init & module_exit and appropriate driver registering/unregistering is done conditionally, using #ifdefs. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-pci.c')
-rw-r--r--drivers/usb/host/ohci-pci.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index 292daf044b62..b331ac4d0d62 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -311,23 +311,3 @@ static struct pci_driver ohci_pci_driver = {
311 .shutdown = usb_hcd_pci_shutdown, 311 .shutdown = usb_hcd_pci_shutdown,
312}; 312};
313 313
314
315static int __init ohci_hcd_pci_init (void)
316{
317 printk (KERN_DEBUG "%s: " DRIVER_INFO " (PCI)\n", hcd_name);
318 if (usb_disabled())
319 return -ENODEV;
320
321 pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
322 sizeof (struct ed), sizeof (struct td));
323 return pci_register_driver (&ohci_pci_driver);
324}
325module_init (ohci_hcd_pci_init);
326
327/*-------------------------------------------------------------------------*/
328
329static void __exit ohci_hcd_pci_cleanup (void)
330{
331 pci_unregister_driver (&ohci_pci_driver);
332}
333module_exit (ohci_hcd_pci_cleanup);